Merge "Protect getCachedChanges from concurrent modification"

This commit is contained in:
Zuul 2020-04-03 18:11:15 +00:00 committed by Gerrit Code Review
commit 653e952f8f
4 changed files with 5 additions and 5 deletions

View File

@ -107,8 +107,8 @@ class GerritSource(BaseSource):
return changes
def getCachedChanges(self):
for x in self.connection._change_cache.values():
for y in x.values():
for x in list(self.connection._change_cache.values()):
for y in list(x.values()):
yield y
def getProject(self, name):

View File

@ -95,7 +95,7 @@ class GithubSource(BaseSource):
return self.connection.getChangesDependingOn(change, projects, tenant)
def getCachedChanges(self):
return self.connection._change_cache.values()
return list(self.connection._change_cache.values())
def getProject(self, name):
p = self.connection.getProject(name)

View File

@ -59,7 +59,7 @@ class GitlabSource(BaseSource):
raise NotImplementedError()
def getCachedChanges(self):
return self.connection._change_cache.values()
return list(self.connection._change_cache.values())
def getProject(self, name):
p = self.connection.getProject(name)

View File

@ -90,7 +90,7 @@ class PagureSource(BaseSource):
change, projects, tenant)
def getCachedChanges(self):
return self.connection._change_cache.values()
return list(self.connection._change_cache.values())
def getProject(self, name):
p = self.connection.getProject(name)