Fix flake8 issues found in cli

This commit is contained in:
Micah Lee 2021-04-29 17:13:05 -07:00
parent 343e1be3d0
commit 0a6056e5e6
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
14 changed files with 146 additions and 128 deletions

View file

@ -383,7 +383,7 @@ class Common:
try:
xdg_config_home = os.environ["XDG_CONFIG_HOME"]
onionshare_data_dir = f"{xdg_config_home}/onionshare"
except:
except Exception:
onionshare_data_dir = os.path.expanduser("~/.config/onionshare")
elif self.platform == "Darwin":
onionshare_data_dir = os.path.expanduser(
@ -393,7 +393,7 @@ class Common:
try:
xdg_config_home = os.environ["XDG_CONFIG_HOME"]
onionshare_data_dir = f"{xdg_config_home}/onionshare"
except:
except Exception:
onionshare_data_dir = os.path.expanduser("~/.config/onionshare")
# Modify the data dir if running tests