| Ryan10145 added a comment. |
@zhuyifei1999 I was thinking of something along the lines of
def download_dump(filepath, is_atomic):
try:
#Put download code here
except (OSError, IOError):
#Exception/remove stuff
if is_atomic:
# Print error, retrying
return download_dump(file_final_storepath, False)
else:
return False
if download_dump(file_temp_storepath, True):
# Print file stored
return
else:
return FalseHowever, if you don't think this would be a good idea or if there are any flaws with this, that's fine.
TASK DETAIL
EMAIL PREFERENCES
To: Ryan10145
Cc: gerritbot, Dalba, Ryan10145, Framawiki, Aklapper, Xqt, jayvdb, siebrand, Zoranzoki21, eflyjason, pywikibot-bugs-list, zhuyifei1999, Cpaulf30, Bright1055, Baloch007, Darkminds3113, Toppole69, Lordiis, Adik2382, Mine0901, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, rafidaslam, MayS, Beeyan, Lewizho99, Mdupont, JJMC89, Maathavan, MtDu, D3r1ck01, Avicennasis, Masti, Alchimista, Rxy
Cc: gerritbot, Dalba, Ryan10145, Framawiki, Aklapper, Xqt, jayvdb, siebrand, Zoranzoki21, eflyjason, pywikibot-bugs-list, zhuyifei1999, Cpaulf30, Bright1055, Baloch007, Darkminds3113, Toppole69, Lordiis, Adik2382, Mine0901, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, rafidaslam, MayS, Beeyan, Lewizho99, Mdupont, JJMC89, Maathavan, MtDu, D3r1ck01, Avicennasis, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
