diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-12-10 17:31:07 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-12-10 17:31:46 +0100 |
commit | 06bbc7056e674a44fe003b90d4f63bd6e9cf5b54 (patch) | |
tree | f7febe4a6289bb9cce30738d3be6ea417fa71914 | |
parent | 56d630ba4864e10add7f5bb3fc2cd9d7de20d12a (diff) |
Fix complaints of flake8 3.5
-rw-r--r-- | dev_requirements.txt | 2 | ||||
-rw-r--r-- | gbp/git/repository.py | 8 | ||||
-rw-r--r-- | gbp/notifications.py | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/dev_requirements.txt b/dev_requirements.txt index 47995a48..096760b1 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,6 +1,6 @@ -r requirements.txt coverage>=2.85 -flake8==3.2.1 +flake8==3.5.0 nose==1.3.7 nosexcover>=1.0.7 diff --git a/gbp/git/repository.py b/gbp/git/repository.py index a7524a4d..3c858fa9 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -112,7 +112,7 @@ class GitRepository(object): ret = os.path.abspath(os.path.join(path, cdup or '.')) except GitRepositoryError: raise # We already have a useful error message - except: + except Exception: raise GitRepositoryError("No Git repository at '%s'" % path) return ret @@ -981,11 +981,11 @@ class GitRepository(object): maxlen = 40 s = sha1.strip() - l = length or maxlen + sl = length or maxlen - if len(s) < l or len(s) > maxlen: + if len(s) < sl or len(s) > maxlen: raise GitRepositoryError("'%s' is not a valid sha1%s" % - (s, " of length %d" % l if length else "")) + (s, " of length %d" % sl if length else "")) return s #{ Trees diff --git a/gbp/notifications.py b/gbp/notifications.py index 9b2f1613..d71f8164 100644 --- a/gbp/notifications.py +++ b/gbp/notifications.py @@ -52,7 +52,7 @@ def send_notification(summary, msg): try: if not n.show(): return False - except: + except Exception: return False return True |