remove resume file once upload is done

This commit is contained in:
j 2012-02-22 22:17:24 +05:30
parent 59151b04fd
commit 8d6cdeee19

View file

@ -642,6 +642,9 @@ class API(ox.API):
}, r, indent=2)
done += len(chunk)
chunk = f.read(CHUNK_SIZE)
if os.path.exists(self._resume_file):
os.unlink(self._resume_file)
resume = None
print ' ' * 80
return data and 'result' in data and data.get('result') == 1
else: