From f220058c63b4d796da36b77938b56c151c0441a2 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Thu, 9 Nov 2017 19:50:50 +1100 Subject: [PATCH] No longer treating shutdown_timeout as a float, but an int of seconds --- onionshare/__init__.py | 4 ++-- onionshare_gui/__init__.py | 2 +- share/locale/en.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/onionshare/__init__.py b/onionshare/__init__.py index 138c03a5..11d2521b 100644 --- a/onionshare/__init__.py +++ b/onionshare/__init__.py @@ -42,7 +42,7 @@ def main(cwd=None): parser = argparse.ArgumentParser() parser.add_argument('--local-only', action='store_true', dest='local_only', help=strings._("help_local_only")) parser.add_argument('--stay-open', action='store_true', dest='stay_open', help=strings._("help_stay_open")) - parser.add_argument('--shutdown-timeout', metavar='shutdown_timeout', dest='shutdown_timeout', help=strings._("help_shutdown_timeout")) + parser.add_argument('--shutdown-timeout', metavar='shutdown_timeout', dest='shutdown_timeout', default=0, help=strings._("help_shutdown_timeout")) parser.add_argument('--stealth', action='store_true', dest='stealth', help=strings._("help_stealth")) parser.add_argument('--debug', action='store_true', dest='debug', help=strings._("help_debug")) parser.add_argument('--config', metavar='config', default=False, help=strings._('help_config')) @@ -56,7 +56,7 @@ def main(cwd=None): local_only = bool(args.local_only) debug = bool(args.debug) stay_open = bool(args.stay_open) - shutdown_timeout = float(args.shutdown_timeout) + shutdown_timeout = int(args.shutdown_timeout) stealth = bool(args.stealth) config = args.config diff --git a/onionshare_gui/__init__.py b/onionshare_gui/__init__.py index cc752d3e..108e711f 100644 --- a/onionshare_gui/__init__.py +++ b/onionshare_gui/__init__.py @@ -79,7 +79,7 @@ def main(): local_only = bool(args.local_only) stay_open = bool(args.stay_open) - shutdown_timeout = float(args.shutdown_timeout) + shutdown_timeout = int(args.shutdown_timeout) debug = bool(args.debug) # Debug mode? diff --git a/share/locale/en.json b/share/locale/en.json index 27f4dab5..21282589 100644 --- a/share/locale/en.json +++ b/share/locale/en.json @@ -26,7 +26,7 @@ "systray_download_canceled_message": "The user canceled the download", "help_local_only": "Do not attempt to use tor: for development only", "help_stay_open": "Keep onion service running after download has finished", - "help_shutdown_timeout": "Shut down the onion service after N hours", + "help_shutdown_timeout": "Shut down the onion service after N seconds", "help_transparent_torification": "My system is transparently torified", "help_stealth": "Create stealth onion service (advanced)", "help_debug": "Log application errors to stdout, and log web errors to disk",