We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f76f57 commit a95497aCopy full SHA for a95497a
browserstack/local_binary.py
@@ -47,7 +47,10 @@ def __available_dir(self):
47
48
def download(self, chunk_size=8192, progress_hook=None):
49
response = urlopen(self.http_path)
50
- total_size = int(response.info().get_all('Content-Length').strip())
+ try:
51
+ total_size = int(response.info().getheader('Content-Length').strip())
52
+ except:
53
+ total_size = int(response.info().get_all('Content-Length')[0].strip())
54
bytes_so_far = 0
55
56
dest_parent_dir = self.__available_dir()
0 commit comments