Skip to content

Commit d35e57e

Browse files
Fix bug I introduced when removing asserts (and latent logic error?)
Fixes gpodder/gpodder-sailfish#211 Signed-off-by: E.S. Rosenberg a.k.a. Keeper of the Keys <[email protected]>
1 parent 163ab08 commit d35e57e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gpodder/download.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ class ContentRange(object):
107107

108108
def __init__(self, start, stop, length):
109109
if start < 0:
110-
raise Exception("Bad start: %r" % start)
111-
if not all(stop is None or (stop >= 0 and stop >= start)):
112-
raise Exception("Bad stop: %r" % stop)
110+
raise Exception("Bad start: {}, stop: {}, length: {}".format(str(start), str(stop), str(length)))
111+
if stop is None or (stop >= 0 and stop <= start):
112+
raise Exception("Bad stop: {}, start: {}, length: {}".format(str(stop), str(start), str(length)))
113113

114114
self.start = start
115115
self.stop = stop

0 commit comments

Comments
 (0)