From 569b7eaca0f07bcddfe2080227ef4684b961ad4c Mon Sep 17 00:00:00 2001 From: Prashant Sinha Date: Sat, 17 Sep 2016 20:41:47 +0530 Subject: [PATCH] Switch FileNotFoundError to EnvironmentError --- hues/console.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hues/console.py b/hues/console.py index 4d11e73..5e7e2cb 100644 --- a/hues/console.py +++ b/hues/console.py @@ -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.''' @@ -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)