devel-project: gracefully skip when removal of previous comment fails.

Given that previous comment is used as a basis for determining the time
since last reminder if it cannot be removed a new reminder should not be
created.
This commit is contained in:
Jimmy Berry 2017-04-11 15:34:29 -05:00
parent e2caae4fd1
commit eab1adb90b

View File

@ -184,7 +184,14 @@ def remind_comment(apiurl, repeat_age, request_id, project, package=None):
return
# Repeat notification so remove old comment.
comment_api.delete(comment['id'])
try:
comment_api.delete(comment['id'])
except HTTPError, e:
if e.code == 403:
# Gracefully skip when previous reminder was by another user.
print(' unable to remove previous reminder')
return
raise e
userids = sorted(maintainers_get(apiurl, project, package))
if len(userids):