Skip to content

Commit

Permalink
Switch FileNotFoundError to EnvironmentError
Browse files Browse the repository at this point in the history
  • Loading branch information
prashnts committed Sep 17, 2016
1 parent 9e8d756 commit 569b7ea
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions hues/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

CONFIG_FNAME = '.hues.yml'

if sys.version_info.major == 2:
class FileNotFoundError(IOError):
'''Implement FileNotFoundError in Python 2'''


class InvalidConfiguration(Exception):
'''Raise when configuration is invalid.'''
Expand Down Expand Up @@ -39,7 +35,7 @@ def _load(cdir, recurse=False):
if type(conf) is not dict:
raise InvalidConfiguration('Configuration at %s is not a dictionary.' % confl)
return conf
except FileNotFoundError:
except EnvironmentError:
parent = os.path.dirname(cdir)
if recurse and parent != cdir:
return _load(parent, recurse=True)
Expand Down

0 comments on commit 569b7ea

Please sign in to comment.