X-Git-Url: https://projects.mako.cc/source/mw/blobdiff_plain/19cab7e9c748f20a3fc0120b98ca20abca6236e0..2c712c501ee2e538d09ad94cf25c5749471c7bfd:/src/mw/metadir.py diff --git a/src/mw/metadir.py b/src/mw/metadir.py index 18811db..6c6bfeb 100644 --- a/src/mw/metadir.py +++ b/src/mw/metadir.py @@ -49,7 +49,7 @@ class Metadir(object): else: self.config = None - def create(self, api_url): + def create(self, api_url, username=None): # create the directory if os.path.isdir(self.location): print '%s: you are already in a mw repo' % self.me @@ -64,6 +64,8 @@ class Metadir(object): self.config = ConfigParser.RawConfigParser() self.config.add_section('remote') self.config.set('remote', 'api_url', api_url) + if username != None: + self.config.set('remote', 'username', username) with open(self.config_loc, 'wb') as config_file: self.config.write(config_file) # create cache/