File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -221,13 +221,19 @@ def get_cloud_password(cloud):
221221
222222 password = decrypted_secrets .get (password_key )
223223
224- if password and isinstance (password , str ):
225- logger .info (f"Successfully loaded password for cloud '{ cloud } '" )
226- return password
224+ if password is not None :
225+ # Convert password to string and strip whitespace
226+ password_str = str (password ).strip ()
227+ if password_str :
228+ logger .info (f"Successfully loaded password for cloud '{ cloud } '" )
229+ return password_str
230+ else :
231+ logger .warning (
232+ f"Password key '{ password_key } ' is empty after conversion"
233+ )
234+ return None
227235 else :
228- logger .warning (
229- f"Password key '{ password_key } ' not found or invalid type in secrets file"
230- )
236+ logger .warning (f"Password key '{ password_key } ' not found in secrets file" )
231237 return None
232238
233239 except Exception as exc :
You can’t perform that action at this time.
0 commit comments