Created
January 7, 2019 16:54
-
-
Save leotop/f470bb52105b780e8c6552d0215e1bea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def download_wait(path_to_downloads): | |
seconds = 0 | |
dl_wait = True | |
while dl_wait and seconds < 900: | |
time.sleep(1) | |
dl_wait = False | |
for fname in os.listdir(path_to_downloads): | |
if fname.endswith('.opdownload'): | |
dl_wait = True | |
seconds += 1 | |
return seconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment