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

Commitbc973d4

Browse files
authored
Merge pull request#729 from xarx00/PR-bugfix-716
Fix for#716: %d replaced by %s
2 parents1792442 +675f879 commitbc973d4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎gitlab/v4/objects.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ def transfer_project(self, to_project_id, **kwargs):
909909
GitlabAuthenticationError: If authentication is not correct
910910
GitlabTransferProjectError: If the project could not be transfered
911911
"""
912-
path='/groups/%d/projects/%d'% (self.id,to_project_id)
912+
path='/groups/%s/projects/%s'% (self.id,to_project_id)
913913
self.manager.gitlab.http_post(path,**kwargs)
914914

915915
@cli.register_custom_action('Group', ('scope','search'))
@@ -930,7 +930,7 @@ def search(self, scope, search, **kwargs):
930930
GitlabList: A list of dicts describing the resources found.
931931
"""
932932
data= {'scope':scope,'search':search}
933-
path='/groups/%d/search'%self.get_id()
933+
path='/groups/%s/search'%self.get_id()
934934
returnself.manager.gitlab.http_list(path,query_data=data,**kwargs)
935935

936936
@cli.register_custom_action('Group', ('cn','group_access','provider'))
@@ -949,7 +949,7 @@ def add_ldap_group_link(self, cn, group_access, provider, **kwargs):
949949
GitlabAuthenticationError: If authentication is not correct
950950
GitlabCreateError: If the server cannot perform the request
951951
"""
952-
path='/groups/%d/ldap_group_links'%self.get_id()
952+
path='/groups/%s/ldap_group_links'%self.get_id()
953953
data= {'cn':cn,'group_access':group_access,'provider':provider}
954954
self.manager.gitlab.http_post(path,post_data=data,**kwargs)
955955

@@ -967,7 +967,7 @@ def delete_ldap_group_link(self, cn, provider=None, **kwargs):
967967
GitlabAuthenticationError: If authentication is not correct
968968
GitlabDeleteError: If the server cannot perform the request
969969
"""
970-
path='/groups/%d/ldap_group_links'%self.get_id()
970+
path='/groups/%s/ldap_group_links'%self.get_id()
971971
ifproviderisnotNone:
972972
path+='/%s'%provider
973973
path+='/%s'%cn
@@ -985,7 +985,7 @@ def ldap_sync(self, **kwargs):
985985
GitlabAuthenticationError: If authentication is not correct
986986
GitlabCreateError: If the server cannot perform the request
987987
"""
988-
path='/groups/%d/ldap_sync'%self.get_id()
988+
path='/groups/%s/ldap_sync'%self.get_id()
989989
self.manager.gitlab.http_post(path,**kwargs)
990990

991991

@@ -3216,7 +3216,7 @@ def download(self, streamed=False, action=None, chunk_size=1024, **kwargs):
32163216
Returns:
32173217
str: The blob content if streamed is False, None otherwise
32183218
"""
3219-
path='/projects/%d/export/download'%self.project_id
3219+
path='/projects/%s/export/download'%self.project_id
32203220
result=self.manager.gitlab.http_get(path,streamed=streamed,
32213221
raw=True,**kwargs)
32223222
returnutils.response_content(result,streamed,action,chunk_size)
@@ -3717,7 +3717,7 @@ def snapshot(self, wiki=False, streamed=False, action=None,
37173717
Returns:
37183718
str: The uncompressed tar archive of the repository
37193719
"""
3720-
path='/projects/%d/snapshot'%self.get_id()
3720+
path='/projects/%s/snapshot'%self.get_id()
37213721
result=self.manager.gitlab.http_get(path,streamed=streamed,
37223722
raw=True,**kwargs)
37233723
returnutils.response_content(result,streamed,action,chunk_size)
@@ -3740,7 +3740,7 @@ def search(self, scope, search, **kwargs):
37403740
GitlabList: A list of dicts describing the resources found.
37413741
"""
37423742
data= {'scope':scope,'search':search}
3743-
path='/projects/%d/search'%self.get_id()
3743+
path='/projects/%s/search'%self.get_id()
37443744
returnself.manager.gitlab.http_list(path,query_data=data,**kwargs)
37453745

37463746
@cli.register_custom_action('Project')
@@ -3755,7 +3755,7 @@ def mirror_pull(self, **kwargs):
37553755
GitlabAuthenticationError: If authentication is not correct
37563756
GitlabCreateError: If the server failed to perform the request
37573757
"""
3758-
path='/projects/%d/mirror/pull'%self.get_id()
3758+
path='/projects/%s/mirror/pull'%self.get_id()
37593759
self.manager.gitlab.http_post(path,**kwargs)
37603760

37613761
@cli.register_custom_action('Project', ('to_namespace', ))
@@ -3772,7 +3772,7 @@ def transfer_project(self, to_namespace, **kwargs):
37723772
GitlabAuthenticationError: If authentication is not correct
37733773
GitlabTransferProjectError: If the project could not be transfered
37743774
"""
3775-
path='/projects/%d/transfer'% (self.id,)
3775+
path='/projects/%s/transfer'% (self.id,)
37763776
self.manager.gitlab.http_put(path,
37773777
post_data={"namespace":to_namespace},
37783778
**kwargs)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp