Commit f3e6d05b authored by Andreas Tille's avatar Andreas Tille

Try to deal with GitlabGetError 'Retry later'

parent 53e5e212
......@@ -6,6 +6,7 @@ import sys
import shutil
import base64
import subprocess
import time
BLENDSGROUPS={ 'Debian 3D Printing Team' : '3dprinter'
, 'Debian Accessibility Team' : 'pkg-a11y'
......@@ -103,7 +104,12 @@ for group in blends_groups:
# DEBUG : only few projects to be faster
# projects = group.projects.list(page=1, per_page=10, order_by='name', sort='asc')
for pr in projects:
project = gl.projects.get(pr.attributes['id']) # without this extra get repository_tree() fails
try:
project = gl.projects.get(pr.attributes['id']) # without this extra get repository_tree() fails
except gitlab.exceptions.GitlabHttpError:
print("Warning: GitlabHttpError while trying to fetch attributes of %s. Wait one second and try again." % pr.attributes['id'])
time.sleep(1)
project = gl.projects.get(pr.attributes['id']) # without this extra get repository_tree() fails
name = project.attributes['name']
namedir = os.path.join(TARGETDIR, name[0])
if not os.path.exists(namedir):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment