commit 166a8c235b7921fe8c61e4d324f9dc22891bace0 Author: Isis Lovecruft isis@torproject.org Date: Sat Oct 26 12:47:24 2013 +0000
Use bridgedb.parse.options instead of bridgedb.opt in script. --- scripts/bridgedb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/scripts/bridgedb b/scripts/bridgedb index 20c44b8..e121bd2 100644 --- a/scripts/bridgedb +++ b/scripts/bridgedb @@ -16,28 +16,28 @@ import os import sys
from bridgedb import runner -from bridgedb import opt +from bridgedb.parse import options
-options = opt.parseOptions() +option = options.parseOptions()
-if options.subCommand is not None: +if option.subCommand is not None: # Hack to set the PYTHONPATH: sys.path[:] = map(os.path.abspath, sys.path) sys.path.insert(0, os.path.abspath(os.getcwd())) sys.path.insert(0, os.path.abspath(os.path.join(os.getcwd(), '../lib')))
- if 'descriptors' in options.subOptions: - runner.generateDescriptors(options) + if 'descriptors' in option.subOptions: + runner.generateDescriptors(option)
- if options.subCommand == 'test': - if options.subOptions['trial']: - runner.runTrial(options.subOptions) - if options.subOptions['unittests']: - runner.runTests(options.subOptions) + if option.subCommand == 'test': + if option.subOptions['trial']: + runner.runTrial(option.subOptions) + if option.subOptions['unittests']: + runner.runTests(option.subOptions) sys.exit()
# If no suboption was given, just run bridgedb: else: from bridgedb import Main - Main.run(options) + Main.run(option)
tor-commits@lists.torproject.org