From d7149d8ea09c897fb954652beeef3bf008448d9e Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 23 Mar 2011 22:37:20 +0100 Subject: [PATCH] Raise EnvironmentError instead of Exception to make pylint happy --- mopidy/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mopidy/__init__.py b/mopidy/__init__.py index 873ee182..e9ced3ae 100644 --- a/mopidy/__init__.py +++ b/mopidy/__init__.py @@ -9,7 +9,7 @@ VERSION = (0, 4, 0) def get_git_version(): process = Popen(['git', 'describe'], stdout=PIPE, stderr=PIPE) if process.wait() != 0: - raise Exception('Execution of "git describe" failed') + raise EnvironmentError('Execution of "git describe" failed') version = process.stdout.read().strip() if version.startswith('v'): version = version[1:] @@ -21,7 +21,7 @@ def get_plain_version(): def get_version(): try: return get_git_version() - except Exception: + except EnvironmentError: return get_plain_version() class MopidyException(Exception):