diff --git a/src/cutecoin/core/app.py b/src/cutecoin/core/app.py index a88292c690ee56e8175d044ace6211b38a54ed49..9734fc76942a3bd47ba8c8b5c2c045299bbf47e5 100644 --- a/src/cutecoin/core/app.py +++ b/src/cutecoin/core/app.py @@ -66,10 +66,6 @@ class Application(object): self.load_cache(account) def load(self): - if not os.path.exists(config.parameters['home']): - logging.info("Creating home directory") - os.makedirs((config.parameters['home'])) - if (os.path.exists(config.parameters['data']) and os.path.isfile(config.parameters['data'])): logging.debug("Loading data...") diff --git a/src/cutecoin/core/config.py b/src/cutecoin/core/config.py index f03644a2a3712b7151301e7909874cae65b7504c..d921a711e52da081aed82b0ba8bf009d1eddee49 100644 --- a/src/cutecoin/core/config.py +++ b/src/cutecoin/core/config.py @@ -7,7 +7,7 @@ Created on 7 févr. 2014 import logging from logging import FileHandler from optparse import OptionParser -from os import environ, path +from os import environ, path, makedirs if "XDG_CONFIG_HOME" in environ: @@ -22,6 +22,10 @@ else: parameters = {'home': path.join(config_path, 'cutecoin'), 'data': path.join(config_path, 'cutecoin', 'data')} +if not path.exists(parameters['home']): + logging.info("Creating home directory") + makedirs((parameters['home'])) + def parse_arguments(argv): parser = OptionParser()