timeout and proper array
This commit is contained in:
parent
b0981645e6
commit
635184f8ad
1 changed files with 4 additions and 1 deletions
|
@ -209,8 +209,11 @@ class Archive(SQLObject):
|
|||
self.notifyFrontend('add', f.md5sum)
|
||||
|
||||
def fillFrontend(self):
|
||||
dto = socket.getdefaulttimeout()
|
||||
socket.setdefaulttimeout(256)
|
||||
data = read_url("%s/list" % self.baseUrlFrontend)
|
||||
files = simplejson.loads(data)
|
||||
files = simplejson.loads(data)['files']
|
||||
socket.setdefaulttimeout(dto)
|
||||
md5sums = [str(f['md5sum']) for f in files.values()]
|
||||
for f in ArchiveFile.select(NOT(IN(ArchiveFile.q.md5sum, md5sums))):
|
||||
self.notifyFrontend('add', f.md5sum)
|
||||
|
|
Loading…
Reference in a new issue