mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Shorter code.
This commit is contained in:
parent
e64e938d21
commit
954f0558f6
1 changed files with 3 additions and 7 deletions
|
|
@ -729,19 +729,15 @@ def __get_file(self, filepath, verify_file, reference_metadata,
|
|||
if compression:
|
||||
file_object.decompress_temp_file_object(compression)
|
||||
|
||||
verify_file(file_object)
|
||||
|
||||
except Exception, exception:
|
||||
# Remember the error from this mirror, and "reset" the target file.
|
||||
logger.exception('Download failed from '+file_mirror+'.')
|
||||
file_mirror_errors[file_mirror] = exception
|
||||
file_object = None
|
||||
else:
|
||||
try:
|
||||
verify_file(file_object)
|
||||
except Exception, exception:
|
||||
file_mirror_errors[file_mirror] = exception
|
||||
file_object = None
|
||||
else:
|
||||
break
|
||||
break
|
||||
|
||||
if file_object:
|
||||
return file_object
|
||||
|
|
|
|||
Loading…
Reference in a new issue