mirror of
https://github.com/rocky-linux/peridot-releng.git
synced 2024-12-22 04:18:30 +00:00
Support string only gather_prepopulate
This commit is contained in:
parent
147aedf354
commit
9a4d612f9b
@ -33,8 +33,13 @@ import os
|
||||
|
||||
class SCM:
|
||||
def __init__(self, pungi_base, scm_dict):
|
||||
if scm_dict["scm"] == "file":
|
||||
file_path = os.path.join(pungi_base, scm_dict["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"])
|
||||
else:
|
||||
file_path = os.path.join(pungi_base, scm_dict)
|
||||
|
||||
f = open(file_path, "r")
|
||||
file_contents = f.read()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user