Skip to content

Commit

Permalink
pycodestyle does not like bare 'except' clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
mxndrwgrdnr committed Jun 27, 2018
1 parent 87a8929 commit 4072946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synthpop/census_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ def try_fips_lookup(self, state, county=None):
if county is None:
try:
return getattr(us.states, state).fips
except:
except (KeyError, NameError, ValueError, AttributeError, IndexError):
pass
return state

try:
return df.loc[(state, county)]
except:
except (KeyError, NameError, ValueError, AttributeError, IndexError):
pass
return state, county

0 comments on commit 4072946

Please sign in to comment.