diff --git a/pupy/agent/__init__.py b/pupy/agent/__init__.py index 8469cba9..aca26c97 100644 --- a/pupy/agent/__init__.py +++ b/pupy/agent/__init__.py @@ -880,6 +880,8 @@ def init_pupy(argv, stdlib, debug=False): set_stdio(null=not debug) set_debug(debug) + + LOGGER = get_logger('pupy') dprint( 'init_pupy: argv={} sys.argv={}', @@ -898,7 +900,6 @@ def init_pupy(argv, stdlib, debug=False): if debug: from .logger import enable_debug_logger - LOGGER = get_logger('pupy') __debug_file = enable_debug_logger(LOGGER) for pending in __debug_pending: @@ -1011,8 +1012,6 @@ def prepare(argv=sys.argv, debug=False, config={}, stdlib=None): def main(argv=sys.argv, debug=False, config={}, stdlib=None): - #import builtins - #builtins.open(2, 'w').write("here from python\n") prepare(argv, debug, config, stdlib) from .service import run diff --git a/pupy/pupylib/PupyConfig.py b/pupy/pupylib/PupyConfig.py index 701a14ba..c5addfc3 100644 --- a/pupy/pupylib/PupyConfig.py +++ b/pupy/pupylib/PupyConfig.py @@ -109,6 +109,7 @@ class PupyConfig(RawConfigParser): self.user_path = path.join(self.user_root, config) if not os.path.exists(self.user_path): + os.makedirs(self.user_root) shutil.copyfile(self.default_file, self.user_path) logger.info("No default pupy config file, creating one in {}".format(self.user_path))