a/Allura/allura/command/base.py b/Allura/allura/command/base.py
...
...
40
    def basic_setup(self):
40
    def basic_setup(self):
41
        global log, M
41
        global log, M
42
        if self.args[0]:
42
        if self.args[0]:
43
            # Probably being called from the command line - load the config file
43
            # Probably being called from the command line - load the config file
44
            self.config = conf = appconfig('config:%s' % self.args[0],relative_to=os.getcwd())
44
            self.config = conf = appconfig('config:%s' % self.args[0],relative_to=os.getcwd())
45
            # Configure logging
46
            try:
47
                # ... logging does not understand section#subsection syntax
45
            # ... logging does not understand section#subsection syntax
48
                logging_config = self.args[0].split('#')[0]
46
            logging_config = self.args[0].split('#')[0]
49
                logging.config.fileConfig(logging_config, disable_existing_loggers=False)
47
            logging.config.fileConfig(logging_config, disable_existing_loggers=False)
50
            except Exception: # pragma no cover
51
                print >> sys.stderr, (
52
                    'Could not configure logging with config file %s' % self.args[0])
53
            log = logging.getLogger('allura.command')
48
            log = logging.getLogger('allura.command')
54
            log.info('Initialize command with config %r', self.args[0])
49
            log.info('Initialize command with config %r', self.args[0])
55
            load_environment(conf.global_conf, conf.local_conf)
50
            load_environment(conf.global_conf, conf.local_conf)
56
            self.setup_globals()
51
            self.setup_globals()
57
            from allura import model
52
            from allura import model