From d2f598a3d40d1d85996c54ef338553b325601646 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Apr 03 2020 17:07:02 +0000 Subject: fix sanity check in merge_scratch Fixes https://pagure.io/koji/issue/2126 Follow up to #2058 https://pagure.io/koji/pull-request/2058 --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 4390079..cd8b4c9 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -6834,7 +6834,7 @@ def merge_scratch(task_id): raise koji.ImportError('task %s did not complete successfully' % task_id) if task_info['method'] != 'build': raise koji.ImportError('task %s is not a build task' % task_id) - if not task_params.get('scratch'): + if not task_params.get('opts', {}).get('scratch'): raise koji.ImportError('task %s is not a scratch build' % task_id) # sanity check the task, and extract data required for import