File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -112,16 +112,9 @@ def probe_asset(url):
112112 """
113113 print (' Probing asset via range request...' )
114114 req = urllib.request.Request(url, headers = {' Range' : ' bytes=0-0' })
115- try :
116- with urllib.request.urlopen(req, timeout = 30 ) as resp:
117- content_range = resp.headers.get(' Content-Range' , ' ' )
118- sha256 = resp.headers.get(' x-amz-meta-sha256' , ' ' )
119- except urllib.error.HTTPError as exc:
120- if exc.code == 206 :
121- content_range = exc.headers.get(' Content-Range' , ' ' )
122- sha256 = exc.headers.get(' x-amz-meta-sha256' , ' ' )
123- else :
124- raise
115+ with urllib.request.urlopen(req, timeout = 30 ) as resp:
116+ content_range = resp.headers.get(' Content-Range' , ' ' )
117+ sha256 = resp.headers.get(' x-amz-meta-sha256' , ' ' )
125118
126119 total_size = None
127120 if ' /' in content_range:
You can’t perform that action at this time.
0 commit comments