mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 16:11:15 +00:00
* Removed ubuntutools/misc.py's mkdir function - superseded by
os.makedirs().
This commit is contained in:
parent
fdffec3237
commit
18a289f7ec
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -4,6 +4,8 @@ ubuntu-dev-tools (0.60) UNRELEASED; urgency=low
|
|||||||
* ubuntutools/common.py: Now split into multiple files depending on
|
* ubuntutools/common.py: Now split into multiple files depending on
|
||||||
function.
|
function.
|
||||||
* Adjusted imports on all files as necessary for the change above.
|
* Adjusted imports on all files as necessary for the change above.
|
||||||
|
* Removed ubuntutools/misc.py's mkdir function - superseded by
|
||||||
|
os.makedirs().
|
||||||
|
|
||||||
[ Iain Lane ]
|
[ Iain Lane ]
|
||||||
* requestsync: Only attempt to change bug importance if in ubuntu-dev, as it
|
* requestsync: Only attempt to change bug importance if in ubuntu-dev, as it
|
||||||
|
@ -23,7 +23,6 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
from optparse import OptionParser, make_option
|
from optparse import OptionParser, make_option
|
||||||
from ubuntutools.lp.libsupport import *
|
from ubuntutools.lp.libsupport import *
|
||||||
from ubuntutools.misc import mkdir
|
|
||||||
|
|
||||||
class CmdOptions(OptionParser):
|
class CmdOptions(OptionParser):
|
||||||
|
|
||||||
@ -104,7 +103,7 @@ def create_credentials(options):
|
|||||||
else:
|
else:
|
||||||
credentialsDir = os.path.expanduser("~/.cache/lp_credentials")
|
credentialsDir = os.path.expanduser("~/.cache/lp_credentials")
|
||||||
if not os.path.isdir(credentialsDir):
|
if not os.path.isdir(credentialsDir):
|
||||||
mkdir(credentialsDir)
|
os.makedirs(credentialsDir)
|
||||||
os.chmod(credentialsDir, 0700)
|
os.chmod(credentialsDir, 0700)
|
||||||
filepath = os.path.expanduser("%s/%s-%s.txt" % \
|
filepath = os.path.expanduser("%s/%s-%s.txt" % \
|
||||||
(credentialsDir, options.consumer, str(options.level).lower()))
|
(credentialsDir, options.consumer, str(options.level).lower()))
|
||||||
|
@ -21,19 +21,6 @@
|
|||||||
# Modules.
|
# Modules.
|
||||||
import os
|
import os
|
||||||
|
|
||||||
def mkdir(directory):
|
|
||||||
"""
|
|
||||||
Create the given directory and all its parents recursively, but don't
|
|
||||||
raise an exception if it already exists.
|
|
||||||
"""
|
|
||||||
|
|
||||||
path = [x for x in directory.split('/') if x]
|
|
||||||
|
|
||||||
for i in xrange(len(path)):
|
|
||||||
current_path = '/' + '/'.join(path[:i+1])
|
|
||||||
if not os.path.isdir(current_path):
|
|
||||||
os.mkdir(current_path)
|
|
||||||
|
|
||||||
def readlist(filename, uniq=True):
|
def readlist(filename, uniq=True):
|
||||||
""" Read a list of words from the indicated file. """
|
""" Read a list of words from the indicated file. """
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user