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