File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ def __init__(
6767 timeout = 60 ,
6868 encrypt = None ,
6969 share_access = None ,
70+ register_session_retries = 5 ,
7071 ** kwargs ,
7172 ):
7273 """
@@ -111,6 +112,7 @@ def __init__(
111112 self .encrypt = encrypt
112113 self .temppath = kwargs .pop ("temppath" , "" )
113114 self .share_access = share_access
115+ self .register_session_retries = register_session_retries
114116 self ._connect ()
115117
116118 @property
@@ -120,7 +122,7 @@ def _port(self):
120122 def _connect (self ):
121123 import time
122124
123- for _ in range (5 ):
125+ for _ in range (self . register_session_retries ):
124126 try :
125127 smbclient .register_session (
126128 self .host ,
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ def smb_params(request):
6363 "port" : request .param ,
6464 "username" : "testuser" ,
6565 "password" : "testpass" ,
66+ "register_session_retries" : 100 , # max ~= 10 seconds
6667 }
6768 finally :
6869 import smbclient # pylint: disable=import-outside-toplevel
You can’t perform that action at this time.
0 commit comments