Skip to content

Commit 7a15d7f

Browse files
Update pyarchivefile.py
1 parent 8418b1b commit 7a15d7f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pyarchivefile.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12526,8 +12526,14 @@ def download_file_from_http_file(url, headers=None, usehttp=__use_http_lib__):
1252612526
if headers is None:
1252712527
headers = {}
1252812528
urlparts = urlparse(url)
12529-
username = unquote(urlparts.username)
12530-
password = unquote(urlparts.password)
12529+
if(urlparts.username is not None):
12530+
username = unquote(urlparts.username)
12531+
else:
12532+
username = None
12533+
if(urlparts.password is not None):
12534+
password = unquote(urlparts.password)
12535+
else:
12536+
password = None
1253112537

1253212538
# Rebuild URL without username and password
1253312539
netloc = urlparts.hostname or ''

0 commit comments

Comments
 (0)