diff --git a/debian/changelog b/debian/changelog index a6aebbe..53759a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ ubuntu-dev-tools (0.60) UNRELEASED; urgency=low * ubuntutools/common.py: Now split into multiple files depending on function. * Adjusted imports on all files as necessary for the change above. + * Removed ubuntutools/misc.py's mkdir function - superseded by + os.makedirs(). [ Iain Lane ] * requestsync: Only attempt to change bug importance if in ubuntu-dev, as it diff --git a/manage-credentials b/manage-credentials index 378647a..1288c5b 100755 --- a/manage-credentials +++ b/manage-credentials @@ -23,7 +23,6 @@ import os import sys from optparse import OptionParser, make_option from ubuntutools.lp.libsupport import * -from ubuntutools.misc import mkdir class CmdOptions(OptionParser): @@ -104,7 +103,7 @@ def create_credentials(options): else: credentialsDir = os.path.expanduser("~/.cache/lp_credentials") if not os.path.isdir(credentialsDir): - mkdir(credentialsDir) + os.makedirs(credentialsDir) os.chmod(credentialsDir, 0700) filepath = os.path.expanduser("%s/%s-%s.txt" % \ (credentialsDir, options.consumer, str(options.level).lower())) diff --git a/ubuntutools/misc.py b/ubuntutools/misc.py index df96e55..5d9b8bb 100644 --- a/ubuntutools/misc.py +++ b/ubuntutools/misc.py @@ -21,19 +21,6 @@ # Modules. 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): """ Read a list of words from the indicated file. """