From 4c9ba66f7e580c964a3c919b0a335e64d8f56f94 Mon Sep 17 00:00:00 2001 From: Mattia Verga Date: Feb 18 2023 07:58:18 +0000 Subject: Do not fail when there's no email from FAS Signed-off-by: Mattia Verga --- diff --git a/find_inactive_packagers.py b/find_inactive_packagers.py index a88d4ea..536b245 100644 --- a/find_inactive_packagers.py +++ b/find_inactive_packagers.py @@ -526,8 +526,9 @@ def step_one(ctx, with_bz_check, open_tickets): if open_tickets: log.debug(f'Opening ticket for user {user}') headers = {'Authorization': f'token {PAGURE_API_KEY}'} + ping_email = mask_email(emails[0]) if len(emails) > 0 else '**ENOEMAIL**' data = {'title': f'Inactive packager detected for user {user}', - 'issue_content': PING_INACTIVE_TEXT.format(username = user, email = mask_email(emails[0])), + 'issue_content': PING_INACTIVE_TEXT.format(username = user, email = ping_email), 'tag': PAGURE_NEW_TICKET_TAG, 'assignee': PAGURE_NEW_TICKET_ASSIGNEE} try: