kojiwrapper: Deal with multiple values for image-build
When the config for image-build command contains multiple values, they should be joined with commas into a single value. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
		
							parent
							
								
									333045fb87
								
							
						
					
					
						commit
						026ba10987
					
				| @ -171,6 +171,8 @@ class KojiWrapper(object): | ||||
|         for section, opts in config_options.items(): | ||||
|             cfg_parser.add_section(section) | ||||
|             for option, value in opts.items(): | ||||
|                 if isinstance(value, list): | ||||
|                     value = ','.join(value) | ||||
|                 if not isinstance(value, six.string_types): | ||||
|                     # Python 3 configparser will reject non-string values. | ||||
|                     value = str(value) | ||||
|  | ||||
| @ -78,7 +78,7 @@ class KojiWrapperTest(KojiWrapperBaseTestCase): | ||||
|                     'target': 'test-target', | ||||
|                     'install_tree': '/tmp/test/install_tree', | ||||
|                     'arches': 'x86_64', | ||||
|                     'format': 'docker,qcow2', | ||||
|                     'format': ['docker', 'qcow2'], | ||||
|                     'kickstart': 'test-kickstart', | ||||
|                     'ksurl': 'git://example.com/ks.git', | ||||
|                     'distro': 'test-distro', | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user