Skip to content
Snippets Groups Projects
Commit 3318487d authored by Jonas Höppner's avatar Jonas Höppner
Browse files

CI: integrate_into_manifest: Fix bug introduced when splitting functions

parent 4c74c580
No related branches found
No related tags found
1 merge request!125CI: integrate_into_manifest: Fix bug introduced when splitting functions
Pipeline #9378 waiting for manual action with stages
in 9 minutes and 56 seconds
...@@ -135,7 +135,7 @@ def integrate_into_manifest( ...@@ -135,7 +135,7 @@ def integrate_into_manifest(
# Parse manifest file # Parse manifest file
try: try:
with open(manifest_filepath.as_posix(), "r", encoding="utf8") as fp: with open(manifest_filepath.as_posix(), "r", encoding="utf8") as fp:
manifest = fp.read_text() manifest = fp.read()
except FileNotFoundError: except FileNotFoundError:
sys.exit("ERROR: file '%s' not found in manifest repo" % manifest_file) sys.exit("ERROR: file '%s' not found in manifest repo" % manifest_file)
...@@ -143,7 +143,7 @@ def integrate_into_manifest( ...@@ -143,7 +143,7 @@ def integrate_into_manifest(
if new_manifest is not None: if new_manifest is not None:
# write file # write file
with open(manifest_filepath.as_posix(), "w", encoding="utf8") as fp: with open(manifest_filepath.as_posix(), "w", encoding="utf8") as fp:
fp.write_text(new_manifest) fp.write(new_manifest)
manifest_repo.index.add([manifest_file]) manifest_repo.index.add([manifest_file])
else: else:
# Look for project in SRCREV as it has not been found in the manifest # Look for project in SRCREV as it has not been found in the manifest
...@@ -154,7 +154,7 @@ def integrate_into_manifest( ...@@ -154,7 +154,7 @@ def integrate_into_manifest(
) )
with open(srcrev_filepath, "r", encoding="utf8") as fp: with open(srcrev_filepath, "r", encoding="utf8") as fp:
srcrev = fp.read_text() srcrev = fp.read()
new_srcrev = update_srcrev(srcrev, recipe_name, new_revision) new_srcrev = update_srcrev(srcrev, recipe_name, new_revision)
# write file # write file
if new_srcrev is None: if new_srcrev is None:
...@@ -163,7 +163,7 @@ def integrate_into_manifest( ...@@ -163,7 +163,7 @@ def integrate_into_manifest(
"no recipe name is specified" % project.path "no recipe name is specified" % project.path
) )
with open(srcrev_filepath.as_posix(), "w", encoding="utf8") as fp: with open(srcrev_filepath.as_posix(), "w", encoding="utf8") as fp:
fp.write_text(new_manifest) fp.write(new_manifest)
manifest_repo.index.add([srcrev_file]) manifest_repo.index.add([srcrev_file])
# Make an API request to create the gitlab.user object # Make an API request to create the gitlab.user object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment