From 7ffe2f55e5241f88a2d84d3e891288818cf53bbd Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Mon, 21 Dec 2009 19:14:04 -0600 Subject: [PATCH] Metadir.create(): handle tiered repositories --- src/mw/metadir.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mw/metadir.py b/src/mw/metadir.py index 22b9c5c..06dbeb3 100644 --- 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 - 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) + else: + os.mkdir(self.location, 0755) # create config self.config = ConfigParser.RawConfigParser() self.config.add_section('remote') -- 2.39.5