Skip to content

Commit 0b18b2c

Browse files
committed
FIX: Checking if the file has been downloaded completely on Firefox
1 parent 1b7d79f commit 0b18b2c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

botcity/web/bot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,5 +1850,8 @@ def wait_for_file(self, path, timeout=60000):
18501850
if elapsed_time > timeout:
18511851
return False
18521852
if os.path.isfile(path) and os.access(path, os.R_OK):
1853+
if self.browser == Browser.FIREFOX and os.path.exists(path + '.part'):
1854+
# if *.part exists, the download is not completed.
1855+
continue
18531856
return True
18541857
self.sleep(config.DEFAULT_SLEEP_AFTER_ACTION)

0 commit comments

Comments
 (0)