Commit e1420437 authored by Jürg Billeter's avatar Jürg Billeter

_artifactcache/ostreecache.py: Fix global remotes

Counter-intuitively, Python list += mutates the list. Use explicit
copy() and extend() instead of += to avoid adding project-specific
remotes to the global remote list.
parent b2b365fb
......@@ -210,10 +210,10 @@ class OSTreeCache(ArtifactCache):
return any_pushed
def initialize_remotes(self, *, on_failure=None):
remote_specs = self.global_remote_specs
remote_specs = self.global_remote_specs.copy()
for project in self.project_remote_specs:
remote_specs += self.project_remote_specs[project]
remote_specs.extend(self.project_remote_specs[project])
remote_specs = list(utils._deduplicate(remote_specs))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment