Merge "Protect getCachedChanges from concurrent modification"
This commit is contained in:
commit
653e952f8f
|
@ -107,8 +107,8 @@ class GerritSource(BaseSource):
|
||||||
return changes
|
return changes
|
||||||
|
|
||||||
def getCachedChanges(self):
|
def getCachedChanges(self):
|
||||||
for x in self.connection._change_cache.values():
|
for x in list(self.connection._change_cache.values()):
|
||||||
for y in x.values():
|
for y in list(x.values()):
|
||||||
yield y
|
yield y
|
||||||
|
|
||||||
def getProject(self, name):
|
def getProject(self, name):
|
||||||
|
|
|
@ -95,7 +95,7 @@ class GithubSource(BaseSource):
|
||||||
return self.connection.getChangesDependingOn(change, projects, tenant)
|
return self.connection.getChangesDependingOn(change, projects, tenant)
|
||||||
|
|
||||||
def getCachedChanges(self):
|
def getCachedChanges(self):
|
||||||
return self.connection._change_cache.values()
|
return list(self.connection._change_cache.values())
|
||||||
|
|
||||||
def getProject(self, name):
|
def getProject(self, name):
|
||||||
p = self.connection.getProject(name)
|
p = self.connection.getProject(name)
|
||||||
|
|
|
@ -59,7 +59,7 @@ class GitlabSource(BaseSource):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def getCachedChanges(self):
|
def getCachedChanges(self):
|
||||||
return self.connection._change_cache.values()
|
return list(self.connection._change_cache.values())
|
||||||
|
|
||||||
def getProject(self, name):
|
def getProject(self, name):
|
||||||
p = self.connection.getProject(name)
|
p = self.connection.getProject(name)
|
||||||
|
|
|
@ -90,7 +90,7 @@ class PagureSource(BaseSource):
|
||||||
change, projects, tenant)
|
change, projects, tenant)
|
||||||
|
|
||||||
def getCachedChanges(self):
|
def getCachedChanges(self):
|
||||||
return self.connection._change_cache.values()
|
return list(self.connection._change_cache.values())
|
||||||
|
|
||||||
def getProject(self, name):
|
def getProject(self, name):
|
||||||
p = self.connection.getProject(name)
|
p = self.connection.getProject(name)
|
||||||
|
|
Loading…
Reference in New Issue