From ec3dc9ce863da77ea4212f735eb279712ee44b0a Mon Sep 17 00:00:00 2001 From: Tomas Hrcka Date: Jul 09 2020 10:55:21 +0000 Subject: Sanitize upstreamurl and description variables to avoid exceptions Signed-off-by: Tomas Hrcka --- diff --git a/fedscm_admin/utils.py b/fedscm_admin/utils.py index 5683041..0b74295 100644 --- a/fedscm_admin/utils.py +++ b/fedscm_admin/utils.py @@ -374,8 +374,8 @@ def prompt_for_new_repo(issue_json, issue_body_json, force=False, issue_json, 'The Pagure project already exists') return - description = issue_body_json['description'].strip() - upstreamurl = issue_body_json['upstreamurl'].strip() + description = issue_body_json.get('description', '').strip() + upstreamurl = issue_body_json.get('upstreamurl', '').strip() component_type = fedscm_admin.pdc.component_type_to_singular(namespace) master_branch = None if branch_name != 'master':