* Removed ubuntutools/misc.py's mkdir function - superseded by

os.makedirs().
This commit is contained in:
Jonathan Davies 2009-01-26 09:34:09 +00:00
parent fdffec3237
commit 18a289f7ec
3 changed files with 3 additions and 15 deletions

2
debian/changelog vendored
View File

@ -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

View File

@ -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()))

View File

@ -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. """