Skip to content

Commit d21b5c7

Browse files
committed
WebDAVFS constructor change:
replace `credentials` with dedicated `login` and `password` parameters
1 parent c050bbe commit d21b5c7

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

webdavfs/opener.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ def open_fs(self, fs_url, parse_result, writeable, create, cwd):
2121

2222
return WebDAVFS(
2323
url='http://{}:{}'.format(webdav_host, webdav_port),
24-
credentials={
25-
'login': parse_result.username,
26-
'password': parse_result.password
24+
login: parse_result.username,
25+
password: parse_result.password
2726
},
2827
root=dir_path,
2928
)

webdavfs/webdavfs.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,15 @@ class WebDAVFS(FS):
147147
'virtual': False,
148148
}
149149

150-
def __init__(self, url, credentials=None, root=None):
150+
def __init__(self, url, login=None, password=None, root=None):
151151
self.url = url
152-
self.credentials = credentials
153152
self.root = root
154153
super(WebDAVFS, self).__init__()
155154

156155
options = {
157156
'webdav_hostname': self.url,
158-
'webdav_login': self.credentials["login"],
159-
'webdav_password': self.credentials["password"],
157+
'webdav_login': login,
158+
'webdav_password': password,
160159
'root': self.root
161160
}
162161
self.client = wc.Client(options)

0 commit comments

Comments
 (0)