mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +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
|
||||
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
|
||||
|
@ -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()))
|
||||
|
@ -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. """
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user