Skip to content

Commit 83cb10e

Browse files
committed
urlcache: Check for no response from server
Signed-off-by: Hector Martin <[email protected]>
1 parent 3c4f1f9 commit 83cb10e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/urlcache.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ def get_partial(self, off, size, bypass_cache=False):
112112
logging.error(f"Response headers: {res.headers.as_string()}")
113113
raise
114114

115+
if not d:
116+
raise Exception(f"Server returned no data for for {self.url_str} range {off}-{off+size-1}")
117+
115118
self.spin = (self.spin + 1) % len(self.SPINNER)
116119
sys.stdout.write(f"\r{self.SPINNER[self.spin]} ")
117120
sys.stdout.flush()

0 commit comments

Comments
 (0)