Skip to content

Commit 7d34874

Browse files
authored
Update pyneofile.py
1 parent 3e97cd2 commit 7d34874

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

pyneofile.py

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

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

0 commit comments

Comments
 (0)