gather: JSON source returns nothing without configuration
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
61a3be2307
commit
670a68a5b8
@ -40,9 +40,11 @@ class GatherSourceJson(pungi.phases.gather.source.GatherSourceBase):
|
|||||||
enabled = True
|
enabled = True
|
||||||
|
|
||||||
def __call__(self, arch, variant):
|
def __call__(self, arch, variant):
|
||||||
json_path = self.compose.conf["gather_source_mapping"]
|
json_path = self.compose.conf.get("gather_source_mapping")
|
||||||
data = open(json_path, "r").read()
|
if not json_path:
|
||||||
mapping = json.loads(data)
|
return set(), set()
|
||||||
|
with open(json_path, "r") as f:
|
||||||
|
mapping = json.load(f)
|
||||||
|
|
||||||
packages = set()
|
packages = set()
|
||||||
if variant is None:
|
if variant is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user