mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-14 04:39:44 +08:00
MockModuleBuilder: fix an encoding error running under Python 2.7
This commit is contained in:
@@ -413,8 +413,8 @@ class MockModuleBuilder(GenericBuilder):
|
||||
# ...and inject modules.yaml there if asked.
|
||||
if include_module_yaml:
|
||||
mmd_path = os.path.join(path, "modules.yaml")
|
||||
with open(mmd_path, "w") as f:
|
||||
f.write(mmd_to_str(m1_mmd))
|
||||
with open(mmd_path, "wb") as f:
|
||||
f.write(mmd_to_str(m1_mmd).encode("utf-8"))
|
||||
execute_cmd(["/usr/bin/modifyrepo_c", "--mdtype=modules", mmd_path, repodata_path])
|
||||
|
||||
def _add_repo(self, name, baseurl, extra=""):
|
||||
|
||||
Reference in New Issue
Block a user