Skip to content
Snippets Groups Projects
Commit 8c440591 authored by Sam Gleske's avatar Sam Gleske
Browse files

Fixed pagination bug

with group namespace resolution.
upstream merge request for python-gitlab.
parent cf185e7d
No related branches found
No related tags found
No related merge requests found
...@@ -45,14 +45,16 @@ git=gitlab.Gitlab(gitlab_url,token_secret) ...@@ -45,14 +45,16 @@ git=gitlab.Gitlab(gitlab_url,token_secret)
def findgroup(gname): def findgroup(gname):
#Locate the group #Locate the group
found_group=False page=1
for group in git.getGroups(): while len(git.getGroups(page=page)) > 0:
if group['name'] == gname: for group in git.getGroups(page=page):
return group if group['name'] == gname:
return group
page += 1
else: else:
if not found_group: print >> stderr, "Project namespace (user or group) not found or user does not have permission of existing group."
print >> stderr, "Project namespace (user or group) not found or user does not have permission of existing group." print >> stderr, "gitlab-mirrors will not automatically create the project namespace."
exit(1) exit(1)
def findproject(gname,pname): def findproject(gname,pname):
page=1 page=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment