else:
self.config = None
+ def save_config(self):
+ with open(self.config_loc, 'wb') as config_file:
+ self.config.write(config_file)
+
def create(self, api_url):
# create the directory
if os.path.isdir(self.location):
self.config = ConfigParser.RawConfigParser()
self.config.add_section('remote')
self.config.set('remote', 'api_url', api_url)
- with open(self.config_loc, 'wb') as config_file:
- self.config.write(config_file)
+ self.save_config()
# create cache/
os.mkdir(os.path.join(self.location, 'cache'))
# create cache/pagedict