fix damn stupid fast resume for real
This commit is contained in:
parent
98b026f155
commit
1132292e9e
18
src/core.py
18
src/core.py
|
@ -474,10 +474,13 @@ class Manager:
|
|||
if not state['is_seed'] and state['state'] != 0 and state['state'] != 1:
|
||||
os.remove(self.unique_IDs[unique_ID].filename + ".fastresume")
|
||||
deluge_core.save_fastresume(unique_ID, self.unique_IDs[unique_ID].filename)
|
||||
except Exception, e:
|
||||
if "No such file or directory" in e:
|
||||
except OSError:
|
||||
print "no old fastresume to delete"
|
||||
else:
|
||||
try:
|
||||
deluge_core.save_fastresume(unique_ID, self.unique_IDs[unique_ID].filename)
|
||||
except:
|
||||
pass
|
||||
except Exception, e:
|
||||
print "Unable to save fastresume: ", e
|
||||
else:
|
||||
# Do not save fastresume if torrent is Queued for checking or being checked
|
||||
|
@ -487,10 +490,13 @@ class Manager:
|
|||
return
|
||||
os.remove(self.unique_IDs[uid].filename + ".fastresume")
|
||||
deluge_core.save_fastresume(uid, self.unique_IDs[uid].filename)
|
||||
except Exception, e:
|
||||
if "No such file or directory" in e:
|
||||
except OSError:
|
||||
print "no old fastresume to delete"
|
||||
else:
|
||||
try:
|
||||
deluge_core.save_fastresume(uid, self.unique_IDs[uid].filename)
|
||||
except:
|
||||
pass
|
||||
except Exception, e:
|
||||
print "Unable to save fastresume: ", e
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in New Issue