summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Jacq <mig@mig5.net>2019-03-24 16:35:53 +1100
committerMiguel Jacq <mig@mig5.net>2019-03-24 16:35:53 +1100
commit881b700b703a373af299c62bb05adc108757da7d (patch)
tree592ed7a2f71428b10a048fc50dc872ed0764a459
parent365798b12f1e887d75b20266f0b636c756969427 (diff)
downloadonionshare-881b700b703a373af299c62bb05adc108757da7d.tar.gz
onionshare-881b700b703a373af299c62bb05adc108757da7d.zip
Don't allow setting an auto-stop timer that is shorter than the auto-start timer
-rw-r--r--onionshare/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/onionshare/__init__.py b/onionshare/__init__.py
index 48ab8c4a..519c25af 100644
--- a/onionshare/__init__.py
+++ b/onionshare/__init__.py
@@ -134,6 +134,11 @@ def main(cwd=None):
app.choose_port()
# Delay the startup if a startup timer was set
if startup_timer > 0:
+ # Can't set a schedule that is later than the shutdown timer
+ if app.shutdown_timeout > 0 and app.shutdown_timeout < startup_timer:
+ print(strings._('gui_timeout_cant_be_earlier_than_startup'))
+ sys.exit()
+
app.start_onion_service(False, True)
if common.settings.get('public_mode'):
url = 'http://{0:s}'.format(app.onion_host)