diff options
author | Micah Lee <micah@micahflee.com> | 2021-04-29 17:13:05 -0700 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2021-04-29 17:13:05 -0700 |
commit | 0a6056e5e6d6e29c2c2bd412ecf02ee9a2a4a8de (patch) | |
tree | 5e79b2ccf784db41748b82129bd4d9658f61a8a9 /cli/onionshare_cli/__init__.py | |
parent | 343e1be3d08e0725815e1a2d6bf7c4717c8c26b5 (diff) | |
download | onionshare-0a6056e5e6d6e29c2c2bd412ecf02ee9a2a4a8de.tar.gz onionshare-0a6056e5e6d6e29c2c2bd412ecf02ee9a2a4a8de.zip |
Fix flake8 issues found in cli
Diffstat (limited to 'cli/onionshare_cli/__init__.py')
-rw-r--r-- | cli/onionshare_cli/__init__.py | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/cli/onionshare_cli/__init__.py b/cli/onionshare_cli/__init__.py index cea445a9..6a7a0fde 100644 --- a/cli/onionshare_cli/__init__.py +++ b/cli/onionshare_cli/__init__.py @@ -18,13 +18,22 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ -import os, sys, time, argparse, threading +import os +import sys +import time +import argparse +import threading from datetime import datetime from datetime import timedelta from .common import Common, CannotFindTor from .web import Web -from .onion import * +from .onion import ( + TorErrorProtocolError, + TorTooOldEphemeral, + TorTooOldStealth, + Onion, +) from .onionshare import OnionShare from .mode_settings import ModeSettings @@ -310,7 +319,7 @@ def main(cwd=None): # In receive mode, you must allows either text, files, or both if mode == "receive" and disable_text and disable_files: - print(f"You cannot disable both text and files") + print("You cannot disable both text and files") sys.exit() # Create the Web object @@ -336,7 +345,7 @@ def main(cwd=None): except KeyboardInterrupt: print("") sys.exit() - except Exception as e: + except Exception: sys.exit() # Start the onionshare app @@ -380,7 +389,9 @@ def main(cwd=None): ) print("") print( - "Warning: Receive mode lets people upload files to your computer. Some files can potentially take control of your computer if you open them. Only open things from people you trust, or if you know what you are doing." + "Warning: Receive mode lets people upload files to your computer. Some files can potentially take " + "control of your computer if you open them. Only open things from people you trust, or if you know " + "what you are doing." ) print("") if mode_settings.get("general", "client_auth"): @@ -474,7 +485,9 @@ def main(cwd=None): ) print("") print( - "Warning: Receive mode lets people upload files to your computer. Some files can potentially take control of your computer if you open them. Only open things from people you trust, or if you know what you are doing." + "Warning: Receive mode lets people upload files to your computer. Some files can potentially take " + "control of your computer if you open them. Only open things from people you trust, or if you know " + "what you are doing." ) print("") |