Skip to content

Commit

Permalink
flake8 + yandexdisk_status: remove try/except
Browse files Browse the repository at this point in the history
  • Loading branch information
lasers committed Aug 22, 2018
1 parent 7b34f56 commit 81e3df7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions py3status/modules/yandexdisk_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
{'color': '#FF0000', 'full_text': 'Yandex.Disk: Not started'}
"""

STRING_ERROR = 'not configured'
STRING_NOT_INSTALLED = 'not installed'


Expand All @@ -52,10 +51,7 @@ def post_config_hook(self):
raise Exception(STRING_NOT_INSTALLED)

def yandexdisk(self):
try:
status = self.py3.command_output('yandex-disk status').splitlines()[0]
except:
self.py3.error(STRING_ERROR)
status = self.py3.command_output('yandex-disk status').splitlines()[0]

if status == "Error: daemon not started":
color = self.py3.COLOR_BAD
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ flake8-ignore =
py3status/modules/wifi.py E722
py3status/modules/wwan.py E722
py3status/modules/wwan_status.py E722
py3status/modules/yandexdisk_status.py E722
py3status/modules/yubikey.py E722

0 comments on commit 81e3df7

Please sign in to comment.