Skip to content

Commit

Permalink
flake8 + i3status: change to inline bare excepts
Browse files Browse the repository at this point in the history
  • Loading branch information
lasers committed Aug 22, 2018
1 parent 0e55c91 commit 76e2730
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions py3status/i3status.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, module_name, i3status):
# be able to restore the correct ones.
try:
name, instance = self.module_name.split()
except:
except: # noqa e722
name = self.module_name
instance = ''
self.name = name
Expand Down Expand Up @@ -190,7 +190,7 @@ def update_time_value(self):
# set the full_text with the correctly formatted date
try:
new_value = date.strftime(self.time_format)
except:
except: # noqa e722
# python 2 unicode
new_value = date.strftime(self.time_format.encode('utf-8'))
new_value = new_value.decode('utf-8')
Expand All @@ -208,7 +208,7 @@ def set_time_zone(self, item):
try:
# python3 compatibility code
i3s_time = i3s_time.decode()
except:
except: # noqa e722
pass

# get datetime and time zone info
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ flake8-ignore =
W605

# bare except on the known files (2018-Aug-22)
py3status/py3status/i3status.py E722
py3status/py3status/parse_config.py E722
py3status/py3status/py3.py E722
py3status/py3status/request.py E722
Expand Down

0 comments on commit 76e2730

Please sign in to comment.