diff --git a/edbob/commands.py b/edbob/commands.py index 00fc31b..9d19cc1 100644 --- a/edbob/commands.py +++ b/edbob/commands.py @@ -159,10 +159,10 @@ Try '%(name)s help ' for more help.""" % self self.print_help() return + # Basic logging should be established before init()ing. + # Use root logger if setting logging flags. log = logging.getLogger() - - # Basic logging should be established before init()ing. edbob.basic_logging() if args.verbose: log.setLevel(logging.INFO) @@ -444,7 +444,7 @@ class ShellCommand(Subcommand): code = ['import edbob'] if edbob.inited: code.append("edbob.init('edbob', %s, shell=True)" % - edbob.config.paths_attempted) + edbob.config.paths_loaded) code.append('from edbob import *') code = '; '.join(code) print "edbob v%s launching Python shell...\n" % edbob.__version__ diff --git a/edbob/configuration.py b/edbob/configuration.py index 9b2880a..52554ac 100644 --- a/edbob/configuration.py +++ b/edbob/configuration.py @@ -229,6 +229,9 @@ class AppConfigParser(ConfigParser.SafeConfigParser): See :meth:`read()` for more information. """ + if path in self.paths_attempted: + return + self.paths_attempted.append(path) log.debug("Reading config file: %s" % path) if not os.path.exists(path):