Skip to content

Commit

Permalink
fix: cannot access local variable 'ssh' where it is not associated wi…
Browse files Browse the repository at this point in the history
…th a value
  • Loading branch information
ImMohammad20000 committed Oct 7, 2024
1 parent d4bcb49 commit 5126bc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def create_zipFile(hostname, port, username, password, var_files, opt_files, is_

except Exception as e:
logging.info(e)
if hasattr(ssh, "close"):
if ssh and hasattr(ssh, "close"):
ssh.close()
return
ssh.close()
Expand Down

0 comments on commit 5126bc9

Please sign in to comment.