Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/environment-downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ dependencies:
- moto <5
- sqlalchemy<2
- flask
- dask-expr
1 change: 1 addition & 0 deletions ci/environment-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies:
- nomkl
- jinja2
- tqdm
- urllib3 <=1.26.18
- pip:
- hadoop-test-cluster
- smbprotocol
23 changes: 15 additions & 8 deletions fsspec/implementations/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,21 @@ def _port(self):
return 445 if self.port is None else self.port

def _connect(self):
smbclient.register_session(
self.host,
username=self.username,
password=self.password,
port=self._port,
encrypt=self.encrypt,
connection_timeout=self.timeout,
)
import time

for _ in range(5):
try:
smbclient.register_session(
self.host,
username=self.username,
password=self.password,
port=self._port,
encrypt=self.encrypt,
connection_timeout=self.timeout,
)
break
except Exception:
time.sleep(0.1)

@classmethod
def _strip_protocol(cls, path):
Expand Down