You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koji/0005-put-ova-options-in-its...

40 lines
1.4 KiB

From 20bb3e15265499d129cb85b6cd41a8724e037082 Mon Sep 17 00:00:00 2001
From: Jay Greguske <jgregusk@redhat.com>
Date: Wed, 16 Apr 2014 14:00:17 -0400
Subject: [PATCH 5/8] put ova options in its own section
---
cli/koji | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/cli/koji b/cli/koji
index 088c505..504b4ba 100755
--- a/cli/koji
+++ b/cli/koji
@@ -5074,14 +5074,17 @@ def handle_image_build(options, session, args):
if config.has_option(section, arg):
setattr(task_options, arg, config.get(section, arg).split(','))
config.remove_option(section, arg)
- # ova_option is newline separated, handle that
- if config.has_option(section, 'ova_option'):
- task_options.ova_option = \
- config.get(section, 'ova_option').splitlines()
- config.remove_option(section, 'ova_option')
# handle everything else
for k, v in config.items(section):
setattr(task_options, k, v)
+
+ # ova-options belong in their own section
+ section = 'ova-options'
+ if config.has_section(section):
+ task_options.ova_option = []
+ for k, v in config.items(section):
+ task_options.ova_option.append('%s=%s' % (k, v))
+
else:
if len(args) < 5:
parser.error(_("At least five arguments are required: a name, " +
--
2.0.4