diff options
-rw-r--r-- | gitlab/exceptions.py | 4 | ||||
-rw-r--r-- | gitlab/objects.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gitlab/exceptions.py b/gitlab/exceptions.py index 733551f..1d1f477 100644 --- a/gitlab/exceptions.py +++ b/gitlab/exceptions.py @@ -75,6 +75,10 @@ class GitlabTransferProjectError(GitlabOperationError): pass +class GitlabProjectDeployKeyError(GitlabOperationError): + pass + + class GitlabCancelError(GitlabOperationError): pass diff --git a/gitlab/objects.py b/gitlab/objects.py index f307156..94b7a7c 100644 --- a/gitlab/objects.py +++ b/gitlab/objects.py @@ -1253,13 +1253,13 @@ class ProjectKey(GitlabObject): """Enable a deploy key for a project.""" url = '/projects/%s/deploy_keys/%s/enable' % (project_id, key_id) r = self.gitlab._raw_post(url) - raise_error_from_response(r, GitlabBuildRetryError, 201) + raise_error_from_response(r, GitlabProjectDeployKeyError, 201) def disable_deploy_key(self, project_id, key_id): """Disable a deploy key for a project.""" url = '/projects/%s/deploy_keys/%s/disable' % (project_id, key_id) r = self.gitlab._raw_delete(url) - raise_error_from_response(r, GitlabBuildRetryError, 201) + raise_error_from_response(r, GitlabProjectDeployKeyError, 201) class ProjectKeyManager(BaseManager): |