Skip to content

Commit

Permalink
Fix native version
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway authored May 12, 2022
1 parent 07940f4 commit 9fd0b87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion imjoy_utils/VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.1.1"
"version": "0.1.2"
}
4 changes: 2 additions & 2 deletions imjoy_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def _get_size(self):
req = Request(self._url, method="HEAD")
response = urlopen(req)
if response.getcode() in [200]:
length = response.info().getheader("Content-Length")
length = response.getheader("Content-Length")
return int(length)
else:
raise Exception(f"Failed to fetch: {response.getcode()}")
Expand All @@ -241,7 +241,7 @@ def _request_range(self, start, end):
req.add_header("range", f"bytes={start}-{end}")
response = urlopen(req)
if response.getcode() in [200, 206]:
crange = response.info().getheader("Content-Range")
crange = response.getheader("Content-Range")
if crange:
self._size = int(crange.split("/")[1])
result = response.read()
Expand Down

0 comments on commit 9fd0b87

Please sign in to comment.