Skip to content

Commit

Permalink
Initialize password and private key variables
Browse files Browse the repository at this point in the history
Initialize password and private key variables before use to avoid
exception "local variable 'priv_key_f' referenced before assignment". A
fix in the implementation of issue #7.
  • Loading branch information
gdsotirov committed Jul 28, 2021
1 parent 61d9d35 commit b87935e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mrcb.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def main():

e.pinfos("Backing up '%s'... " % rtr['name'])

login_pass = None
priv_key_f = None

# export configuration
try:
ros = routeros.SecureTransport(rtr['hostname'], rtr['port'])
Expand Down

0 comments on commit b87935e

Please sign in to comment.