mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-05 02:56:17 +01:00
fix handling of empty prjconfig meta
if prjconfig meta is empty the class metafile init fails with if isinstance(input[0], str): IndexError: list index out of range This is because input is an empty list and has no [0] index. This can be fixed by changing this line to: if input and isinstance(input[0], str):
This commit is contained in:
parent
d516560d47
commit
ef4b0ce023
@ -3666,7 +3666,7 @@ class metafile:
|
|||||||
|
|
||||||
if not isinstance(input, list):
|
if not isinstance(input, list):
|
||||||
input = [input]
|
input = [input]
|
||||||
if isinstance(input[0], str):
|
if input and isinstance(input[0], str):
|
||||||
input_as_str = ''.join(input)
|
input_as_str = ''.join(input)
|
||||||
else:
|
else:
|
||||||
open_mode = 'wb'
|
open_mode = 'wb'
|
||||||
|
Loading…
Reference in New Issue
Block a user