зеркало из https://github.com/mozilla/stoneridge.git
More syntax fixups
This commit is contained in:
Родитель
30f64f8310
Коммит
b54b5e2617
|
@ -218,6 +218,6 @@ class ArgumentParser(argparse.ArgumentParser):
|
|||
def parse_args(self, **kwargss):
|
||||
args = argparse.ArgumentParser.parse_args(self, **kwargs)
|
||||
|
||||
setup_dirnames(args['_sr_root_'], args['_sr_work_'])
|
||||
setup_dirnames(args._sr_root_, args._sr_work_)
|
||||
|
||||
return args
|
||||
|
|
|
@ -143,8 +143,8 @@ def main():
|
|||
parser.add_option('--workdir', dest='workdir')
|
||||
args = parser.parse_args()
|
||||
|
||||
if args['update']:
|
||||
stoneridge.update(parser['config']):
|
||||
if args.update:
|
||||
stoneridge.update(args.config):
|
||||
return subprocess.call([sys.executable, sys.executable, __file__,
|
||||
'--no-update'])
|
||||
|
||||
|
@ -152,12 +152,12 @@ def main():
|
|||
srroot = os.path.split(__file__)[0]
|
||||
|
||||
# Create a working space for this run
|
||||
if args['workdir']:
|
||||
srwork = os.path.abspath(args['workdir'])
|
||||
if args.workdir:
|
||||
srwork = os.path.abspath(args.workdir)
|
||||
if not os.path.exists(srwork):
|
||||
os.mkdir(srwork)
|
||||
else:
|
||||
srwork = tempfile.mkdtemp()
|
||||
|
||||
cronjob = StoneRidgeCronJob(args['config'], srroot, srwork)
|
||||
cronjob = StoneRidgeCronJob(args.config, srroot, srwork)
|
||||
cronjob.run()
|
||||
|
|
|
@ -31,5 +31,5 @@ def main():
|
|||
help='URL of graph server to upload to')
|
||||
args = parser.parse_args()
|
||||
|
||||
uploader = StoneRidgeUploader(args['url'])
|
||||
uploader = StoneRidgeUploader(args.url)
|
||||
uploader.run()
|
||||
|
|
Загрузка…
Ссылка в новой задаче