From f4780813d68d4bc942e92ea41fd21999f495c184 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Fri, 4 Dec 2015 13:17:45 -0800 Subject: [PATCH] Decorator is expecting argument to be named slug_candidate, not shutdown_slug_candidate (#200) --- onionshare/web.py | 2 +- onionshare_gui/onionshare_gui.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/onionshare/web.py b/onionshare/web.py index 65acfdfd..89565810 100644 --- a/onionshare/web.py +++ b/onionshare/web.py @@ -250,7 +250,7 @@ def page_not_found(e): shutdown_slug = helpers.random_string(16) -@app.route("//shutdown") +@app.route("//shutdown") @check_slug_candidate(shutdown_slug) def shutdown(): """ diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index d9d94f98..026b7f47 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -185,7 +185,7 @@ class OnionShareGui(QtGui.QWidget): """ Stop the onionshare server. """ - if self.server_status.status == self.server_status.STATUS_STARTED: + if self.server_status.status != self.server_status.STATUS_STOPPED: web.stop(self.app.port) self.app.cleanup() self.filesize_warning.hide()