aboutsummaryrefslogtreecommitdiff
path: root/cli/onionshare_cli/web/web.py
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2021-04-29 17:13:05 -0700
committerMicah Lee <micah@micahflee.com>2021-04-29 17:13:05 -0700
commit0a6056e5e6d6e29c2c2bd412ecf02ee9a2a4a8de (patch)
tree5e79b2ccf784db41748b82129bd4d9658f61a8a9 /cli/onionshare_cli/web/web.py
parent343e1be3d08e0725815e1a2d6bf7c4717c8c26b5 (diff)
downloadonionshare-0a6056e5e6d6e29c2c2bd412ecf02ee9a2a4a8de.tar.gz
onionshare-0a6056e5e6d6e29c2c2bd412ecf02ee9a2a4a8de.zip
Fix flake8 issues found in cli
Diffstat (limited to 'cli/onionshare_cli/web/web.py')
-rw-r--r--cli/onionshare_cli/web/web.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/cli/onionshare_cli/web/web.py b/cli/onionshare_cli/web/web.py
index 7c2e4256..e64943e6 100644
--- a/cli/onionshare_cli/web/web.py
+++ b/cli/onionshare_cli/web/web.py
@@ -41,6 +41,7 @@ from .receive_mode import ReceiveModeWeb, ReceiveModeWSGIMiddleware, ReceiveMode
from .website_mode import WebsiteModeWeb
from .chat_mode import ChatModeWeb
+
# Stub out flask's show_server_banner function, to avoiding showing warnings that
# are not applicable to OnionShare
def stubbed_show_server_banner(env, debug, app_import_path, eager_loading):
@@ -49,7 +50,7 @@ def stubbed_show_server_banner(env, debug, app_import_path, eager_loading):
try:
flask.cli.show_server_banner = stubbed_show_server_banner
-except:
+except Exception:
pass
@@ -327,7 +328,7 @@ class Web:
def generate_password(self, saved_password=None):
self.common.log("Web", "generate_password", f"saved_password={saved_password}")
- if saved_password != None and saved_password != "":
+ if saved_password is not None and saved_password != "":
self.password = saved_password
self.common.log(
"Web",
@@ -363,7 +364,7 @@ class Web:
if func is None and self.mode != "chat":
raise RuntimeError("Not running with the Werkzeug Server")
func()
- except:
+ except Exception:
pass
self.running = False