mirror of
https://github.com/rocky-linux/peridot-releng.git
synced 2024-11-21 23:01:23 +00:00
Support string only gather_prepopulate
This commit is contained in:
parent
147aedf354
commit
9a4d612f9b
@ -33,8 +33,13 @@ import os
|
|||||||
|
|
||||||
class SCM:
|
class SCM:
|
||||||
def __init__(self, pungi_base, scm_dict):
|
def __init__(self, pungi_base, scm_dict):
|
||||||
if scm_dict["scm"] == "file":
|
if isinstance(scm_dict, str) or scm_dict["scm"] == "file":
|
||||||
|
file_path = ""
|
||||||
|
if not isinstance(scm_dict, str):
|
||||||
file_path = os.path.join(pungi_base, scm_dict["file"])
|
file_path = os.path.join(pungi_base, scm_dict["file"])
|
||||||
|
else:
|
||||||
|
file_path = os.path.join(pungi_base, scm_dict)
|
||||||
|
|
||||||
f = open(file_path, "r")
|
f = open(file_path, "r")
|
||||||
file_contents = f.read()
|
file_contents = f.read()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user