From 208a98e8e73396381f05f8a860ba42cabc441035 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Oct 30 2017 20:54:03 +0000 Subject: PR#655: fix unreachable code Merges #655 https://pagure.io/koji/pull-request/655 --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 8e846b0..dab88ee 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -936,7 +936,8 @@ def anon_handle_mock_config(goptions, session, args): opts['repoid'] = brootinfo['repo_id'] opts['tag_name'] = brootinfo['tag_name'] arch = brootinfo['arch'] - def_name = "%s-task_%i" % (opts['tag_name'], task_id) + if not options.name: + options.name = "%s-task_%i" % (opts['tag_name'], task_id) elif options.tag: if not options.arch: print(_("Please specify an arch")) @@ -958,7 +959,6 @@ def anon_handle_mock_config(goptions, session, args): print(_("Could not get a repo for tag: %(name)s") % tag) return 1 opts['repoid'] = repo['id'] - def_name = "%(tag_name)s-repo_%(repoid)s" % opts elif options.target: if not options.arch: print(_("Please specify an arch"))