Skip to content

Commit 76037cd

Browse files
committed
Fix error in upload progress updating (houtianze#260); Add in aria2 downloading retry (houtianze#263)
1 parent 2406463 commit 76037cd

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

HISTORY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### Version History:
22

3+
- 1.2.20: Fix an error in upload resuming; Add in retries for aria2
34
- 1.2.19: Add in aria2 download support
45
- 1.2.18: Add in upload resuming using slices; Fix Unicode issue with py2_jsondump(); Fix the pypi setup package
56
- 1.2.17: Fix UnicodeEncodeError on redirect; Add in retry on urllib3 TimeOutError

bypy.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
from __future__ import division
4545

4646
### special variables that say about this module
47-
__version__ = '1.2.19'
47+
__version__ = '1.2.20'
4848

4949
### return (error) codes
5050
# they are put at the top because:
@@ -2366,7 +2366,7 @@ def __update_progress_entry(self, fullpath):
23662366

23672367
def __delete_progress_entry(self, fullpath):
23682368
progress = jsonload(ProgressPath)
2369-
progress.remove(fullpath)
2369+
del progress[fullpath]
23702370
jsondump(progress, ProgressPath)
23712371

23722372
def __upload_file_slices(self, localpath, remotepath, ondup = 'overwrite'):
@@ -2820,7 +2820,9 @@ def __down_aria2c(self, remotefile, localfile):
28202820
self.pd("call: {}".format(cmd))
28212821
ret = subprocess.call(cmd, shell = True)
28222822
self.pd("aria2c exited with status: {}".format(ret))
2823-
# TODO: map return codes to our internal errors
2823+
# TODO: a finer map return codes to our internal errors
2824+
if ret != ENoError:
2825+
ret == ERequestFailed
28242826
return ret
28252827

28262828
# requirment: self.__remote_json is already gotten

0 commit comments

Comments
 (0)