2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +00:00

Make get_file and save_file handle StopTransmission errors

This commit is contained in:
Dan 2019-01-11 14:03:16 +01:00
parent 6b63e88de7
commit b37d4dc7ec

View File

@ -1368,6 +1368,8 @@ class Client(Methods, BaseClient):
if progress:
progress(self, min(file_part * part_size, file_size), file_size, *progress_args)
except Client.StopTransmission:
raise
except Exception as e:
log.error(e, exc_info=True)
else:
@ -1569,6 +1571,7 @@ class Client(Methods, BaseClient):
except Exception as e:
raise e
except Exception as e:
if not isinstance(e, Client.StopTransmission):
log.error(e, exc_info=True)
try: