commit ceef52c348bb3f4477c3d031d024c89eb7379039 Author: Arturo Filastò art@fuffa.org Date: Tue Aug 12 19:01:31 2014 +0200
Make the update-inputs command an option --- ooni/resources/cli.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/ooni/resources/cli.py b/ooni/resources/cli.py index 4cc4c6d..fdcbe07 100644 --- a/ooni/resources/cli.py +++ b/ooni/resources/cli.py @@ -9,6 +9,9 @@ from ooni.resources import update class Options(usage.Options): synopsis = """%s"""
+ optFlags = [ + ["update-inputs", None, "Update the resources needed for inputs"] + ] optParameters = []
def opt_version(self): @@ -25,4 +28,9 @@ def run(): print "%s: Try --help for usage details." % (sys.argv[0]) sys.exit(1)
- return update.download_inputs() + if options['update-inputs']: + return update.download_inputs() + + print "%s: no command specified" % sys.argv[0] + print "%s: Try --help for usage details." % (sys.argv[0]) + sys.exit(1)