Skip to content

Commit 16eec70

Browse files
jeremie-dautheribesJPEWdev
authored andcommitted
TransRead: support FTP authentication
So far, we have assumed that user authentication is only relevant for HTTP(S). But the urllib module used to support HTTP authentication also supports FTP authentication. HTTP authentication requires more steps than FTP to work, so let just skip HTTP-specific steps for FTP authentication. Signed-off-by: Jérémie Dautheribes <[email protected]>
1 parent 8a090f1 commit 16eec70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bmaptool/TransRead.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ def _print_warning(timeout):
607607
except netrc.NetrcParseError as e:
608608
_log.error(f"Error parsing line {e.lineno} of {e.filename}: {e.msg}")
609609

610-
if username and password:
610+
if username and password and parsed_url.scheme in ("http", "https"):
611611
# Unfortunately, in order to handle URLs which contain username
612612
# and password (e.g., http://user:[email protected]), we need to
613613
# do few extra things.

0 commit comments

Comments
 (0)