diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2016-06-17 19:21:17 +0100 |
---|---|---|
committer | VLetrmx <richardipsum@fastmail.co.uk> | 2016-06-17 18:44:34 +0000 |
commit | 04afe06bcd33729db0e6c8dd767edc9f399165eb (patch) | |
tree | dfc62bdbdfcb6e81761dfb446ed0a0c8e0bde378 | |
parent | 14b816b40f44ca19d51d9fe478fdcae8cc53d73a (diff) | |
download | lorry-controller-04afe06bcd33729db0e6c8dd767edc9f399165eb.tar.gz |
Make use of the exceptions response_code member variable
Change-Id: Iad9139bb6bbce07926ca800c0525601a43341c69
-rw-r--r-- | lorrycontroller/gitlab.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lorrycontroller/gitlab.py b/lorrycontroller/gitlab.py index 55b8e4f..a426b0d 100644 --- a/lorrycontroller/gitlab.py +++ b/lorrycontroller/gitlab.py @@ -71,7 +71,7 @@ class Gitlab(object): try: group = self.gl.groups.get(group_name) except gitlab.GitlabGetError as e: - if e.error_message == '404 Not found': + if e.response_code == 404: group = self.gl.groups.create( {'name': group_name, 'path': group_name}) else: |