Skip to content

Commit b87935e

Browse files
committed
Initialize password and private key variables
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.
1 parent 61d9d35 commit b87935e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

mrcb.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ def main():
113113

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

116+
login_pass = None
117+
priv_key_f = None
118+
116119
# export configuration
117120
try:
118121
ros = routeros.SecureTransport(rtr['hostname'], rtr['port'])

0 commit comments

Comments
 (0)