From 779e5207ef3d3fca95503ea9dd58be0932187d49 Mon Sep 17 00:00:00 2001 From: Guido Diepen Date: Wed, 1 Nov 2023 16:08:34 +0100 Subject: [PATCH] Address the comment of @martindurant In case the user is not None and no password has been provided, we will default back to the original behavior --- fsspec/implementations/webhdfs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fsspec/implementations/webhdfs.py b/fsspec/implementations/webhdfs.py index ff50140f4..7ca6cb253 100644 --- a/fsspec/implementations/webhdfs.py +++ b/fsspec/implementations/webhdfs.py @@ -109,6 +109,7 @@ def __init__( ) self.pars["delegation"] = token self.user = user + if password is not None: if self.user is None: raise ValueError( @@ -116,6 +117,10 @@ def __init__( "set in order to set up the basic-auth" ) self.password = password + else: + if user is not None: + self.pars["user.name"] = user + if proxy_to is not None: self.pars["doas"] = proxy_to if kerberos and user is not None: