Skip to content

Commit 2dec375

Browse files
authored
Merge pull request #31 from lf2a/fix-wait-for-file-firefox
FIX: Checking if the file has been downloaded completely on Firefox
2 parents 1b7d79f + 0b18b2c commit 2dec375

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)