Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit61d4cac

Browse files
Asher256@users.noreply.github.comAsher256@users.noreply.github.com
Asher256@users.noreply.github.com
authored and
Asher256@users.noreply.github.com
committed
New exception for ProjectKey.enable_deploy_key and disable_deploy_key
1 parentfc5c52c commit61d4cac

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎gitlab/exceptions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ class GitlabTransferProjectError(GitlabOperationError):
7575
pass
7676

7777

78+
classGitlabProjectDeployKeyError(GitlabOperationError):
79+
pass
80+
81+
7882
classGitlabCancelError(GitlabOperationError):
7983
pass
8084

‎gitlab/objects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,13 +1253,13 @@ def enable_deploy_key(self, project_id, key_id):
12531253
"""Enable a deploy key for a project."""
12541254
url='/projects/%s/deploy_keys/%s/enable'% (project_id,key_id)
12551255
r=self.gitlab._raw_post(url)
1256-
raise_error_from_response(r,GitlabBuildRetryError,201)
1256+
raise_error_from_response(r,GitlabProjectDeployKeyError,201)
12571257

12581258
defdisable_deploy_key(self,project_id,key_id):
12591259
"""Disable a deploy key for a project."""
12601260
url='/projects/%s/deploy_keys/%s/disable'% (project_id,key_id)
12611261
r=self.gitlab._raw_delete(url)
1262-
raise_error_from_response(r,GitlabBuildRetryError,201)
1262+
raise_error_from_response(r,GitlabProjectDeployKeyError,201)
12631263

12641264

12651265
classProjectKeyManager(BaseManager):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp