dont fail if resume file can not be loaded

This commit is contained in:
j 2013-04-22 19:07:19 +02:00
parent 02901c7616
commit 376dd794bc

View file

@ -694,7 +694,10 @@ class API(ox.API):
resume = None resume = None
if os.path.exists(self._resume_file): if os.path.exists(self._resume_file):
with open(self._resume_file) as f: with open(self._resume_file) as f:
try:
resume = json.load(f) resume = json.load(f)
except:
resume = {}
if resume.get('chunkUploadUrl') != url: if resume.get('chunkUploadUrl') != url:
resume = None resume = None
if resume: if resume: