File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ def _cleanup(self):
5959
6060
6161class PasswordResult :
62- def __init__ (self , password = None , cache_hint = None ):
62+ def __init__ (self , password = None , cache_hint = False ):
6363 self .password = password
6464 self .cache_hint = cache_hint
6565
@@ -166,7 +166,8 @@ async def get_password_tty(device, options):
166166 # TODO: make this a TRUE async
167167 text = _ ('Enter password for {0.device_presentation}: ' , device )
168168 try :
169- return PasswordResult (getpass .getpass (text ))
169+ return PasswordResult (getpass .getpass (text ),
170+ options .get ('cache_hint' , False ))
170171 except EOFError :
171172 print ("" )
172173 return None
@@ -223,7 +224,7 @@ async def __call__(self, device):
223224
224225 async def password (self , device , options ):
225226 text = await self (device )
226- return PasswordResult (text )
227+ return PasswordResult (text , options . get ( 'cache_hint' , False ) )
227228
228229
229230def password (password_command ):
You can’t perform that action at this time.
0 commit comments