diff --git a/sssekai/__init__.py b/sssekai/__init__.py index e6454b3..8fe3cff 100644 --- a/sssekai/__init__.py +++ b/sssekai/__init__.py @@ -1,5 +1,5 @@ __VERSION_MAJOR__ = 0 __VERSION_MINOR__ = 5 -__VERSION_PATCH__ = 8 +__VERSION_PATCH__ = 9 __version__ = "%s.%s.%s" % (__VERSION_MAJOR__, __VERSION_MINOR__, __VERSION_PATCH__) diff --git a/sssekai/abcache/fs.py b/sssekai/abcache/fs.py index fc286e7..0ee7f8d 100644 --- a/sssekai/abcache/fs.py +++ b/sssekai/abcache/fs.py @@ -104,7 +104,7 @@ def __resp(self) -> Response: def __fetch(self): def __innner(): for block in decrypt_iter( - lambda nbytes: next(self.__resp.iter_content(nbytes)), self.blocksize + lambda nbytes: next(self.__resp.iter_content(nbytes), b''), self.blocksize ): yield bytes(block) @@ -113,7 +113,7 @@ def __innner(): def _fetch_range(self, start, end): assert start - self.fetch_loc == 0, "can only fetch sequentially" self.fetch_loc = end - return next(self.__fetch) + return next(self.__fetch, b'') # Reference: https://github.com/fsspec/filesystem_spec/blob/master/fsspec/implementations/libarchive.py diff --git a/sssekai/entrypoint/abcache.py b/sssekai/entrypoint/abcache.py index edee020..feca83a 100644 --- a/sssekai/entrypoint/abcache.py +++ b/sssekai/entrypoint/abcache.py @@ -35,6 +35,7 @@ def _download(self, src: AbCacheFile, dest: str): return except Exception as e: logger.error("While downloading %s : %s. Retrying" % (src.path, e)) + raise e if _ == RETRIES - 1: logger.critical("Did not download %s" % src.path) self._ensure_progress()