ненужные перестраховки
parent
8ea64f3cd3
commit
312da87172
|
@ -309,9 +309,9 @@ class Engine:
|
||||||
res = self.list(timeout=timeout)
|
res = self.list(timeout=timeout)
|
||||||
if res:
|
if res:
|
||||||
try:
|
try:
|
||||||
return next((f for f in res if f.index == file_index))
|
return res[file_index]
|
||||||
except StopIteration:
|
except IndexError:
|
||||||
raise Error("Requested file index (%d) is invalid" % file_index, Error.INVALID_FILE_INDEX,
|
raise Error("Requested file index (%d) is invalid" % (file_index,), Error.INVALID_FILE_INDEX,
|
||||||
file_index=file_index)
|
file_index=file_index)
|
||||||
|
|
||||||
def peers(self, timeout=10):
|
def peers(self, timeout=10):
|
||||||
|
|
Loading…
Reference in New Issue