Commit 59977604 authored by Romain Bouvier's avatar Romain Bouvier
Browse files

Fix "description" of migrated bug

- The if was removed on a previous cleanup, so description was always
  empty
- Remove old python-gitlab workaround
- Set the logfile name to current product name
parent 356d0c8a
......@@ -161,6 +161,14 @@ def processbug(bgo, bzurl, instance, resolution, target, user_cache,
else:
author = None
if author == bzbug.creator:
desctext = firstcomment['text']
if 'attachment_id' in firstcomment:
desctext += '\n' + migrate_attachment(firstcomment,
attachment_metadata)
comments = comments[1:]
description = \
template.render_issue_description(bzurl, bzbug, desctext, user_cache)
......@@ -235,11 +243,9 @@ def processbug(bgo, bzurl, instance, resolution, target, user_cache,
issue.subscribe(sudo=subscriber.username)
print("is subscribe ok ?")
except gitlab.GitlabSubscribeError as e:
if e.response_code in (201, 304):
if e.response_code == 304:
print("Response code : {}".format(e.response_code))
print("Response : {}".format(e))
# 201 == workaround for python-gitlab bug
# https://github.com/python-gitlab/python-gitlab/pull/382
# 304 == already subscribed
continue
if e.response_code == 403:
......@@ -333,7 +339,7 @@ def main():
giturl = "https://git.xfce.org/"
instance = "xfce.org"
bzresolution = 'MOVED'
logfilename = 'bztogl.csv'
logfilename = args.product + '.csv'
target = common.GitLab(glurl, giturl, args.token, args.product,
args.target_project, args.automate)
......
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