Skip to content

Commit

Permalink
Fix PEP issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Nov 14, 2017
1 parent 03a45b3 commit d245768
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion smartmin/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def unicode_csv_reader(utf8_data, dialect=csv.excel, **kwargs):
for cell in row:
try:
cell = six.text_type(cell)
except:
except Exception:
cell = six.text_type(cell.decode(ascii_codec))

encoded.append(cell)
Expand Down
2 changes: 1 addition & 1 deletion smartmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def lookup_field_orderable(self, field):
try:
self.model._meta.get_field_by_name(field)
return True
except:
except Exception:
# that field doesn't exist, so not sortable
return False

Expand Down

0 comments on commit d245768

Please sign in to comment.