commit 44db6ffd1f9f4d072b80ddb5021ef05c60bca567 Author: Isis Lovecruft isis@torproject.org Date: Fri Nov 15 17:48:16 2013 +0000
Save config.RUN_IN_DIR, not state.RUN_IN_DIR, so subCommand can access it.
If we save the runtime directory location later in Main.setup() when the persistent.State instance is created, then any options.subCommands which run earlier cannot access it. --- lib/bridgedb/Main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bridgedb/Main.py b/lib/bridgedb/Main.py index 0ed335a..fa2e3bf 100644 --- a/lib/bridgedb/Main.py +++ b/lib/bridgedb/Main.py @@ -351,6 +351,7 @@ def startup(options, rundir, configFile): os.chdir(rundir)
config = loadConfig(configFile) + config.RUN_IN_DIR = rundir
# Set up logging as early as possible. We cannot import from the bridgedb # package any of our modules which import :mod:`logging` and start using @@ -376,7 +377,6 @@ def startup(options, rundir, configFile): from bridgedb import persistent
state = persistent.State(config=config) - state.RUN_IN_DIR = rundir
from bridgedb import EmailServer from bridgedb import HTTPServer
tor-commits@lists.torproject.org