Addd check if temp folder exists

This commit is contained in:
Jack Stdin 2016-02-14 17:47:12 +03:00
parent 9a0cf44ff3
commit e248c31ffc

View File

@ -23,7 +23,8 @@ class AoRar:
if os.path.isfile(local_filename):
os.remove(local_filename)
else:
os.makedirs(folders.temp)
if not os.path.exists(folders.temp):
os.makedirs(folders.temp)
request = requests.get(url, stream=True)
with open(local_filename, 'wb') as f: