projects
/
mw
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a58c940
)
Metadir.create(): handle tiered repositories
author
Ian Weller
<ian@ianweller.org>
Tue, 22 Dec 2009 01:14:04 +0000
(19:14 -0600)
committer
Ian Weller
<ian@ianweller.org>
Tue, 22 Dec 2009 01:14:04 +0000
(19:14 -0600)
src/mw/metadir.py
patch
|
blob
|
history
diff --git
a/src/mw/metadir.py
b/src/mw/metadir.py
index 22b9c5cf0049144092ecc6c0b2d1aee4e7365020..06dbeb368b5046d672c682a984988e2406260274 100644
(file)
--- a/
src/mw/metadir.py
+++ b/
src/mw/metadir.py
@@
-46,11
+46,11
@@
class Metadir(object):
def create(self, api_url):
# create the directory
def create(self, api_url):
# create the directory
- try:
- os.mkdir(self.location, 0755)
- except OSError, e:
+ if os.path.isdir(self.location):
print '%s: you are already in a mw repo' % self.me
sys.exit(1)
print '%s: you are already in a mw repo' % self.me
sys.exit(1)
+ else:
+ os.mkdir(self.location, 0755)
# create config
self.config = ConfigParser.RawConfigParser()
self.config.add_section('remote')
# create config
self.config = ConfigParser.RawConfigParser()
self.config.add_section('remote')
Benjamin Mako Hill
||
Want to submit a patch?