Skip to content

Commit ceec170

Browse files
authored
Fixes script ignoring session id envar. (#105)
1 parent 4c72ab3 commit ceec170

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

import_export_package.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ def get_version(client):
6060
handle_login_fail(not test_reply.success, "Extract SID is invalid!")
6161
get_version(client)
6262
elif args.login == '4':
63-
client.sid = input("Please enter sid: ")
63+
if args.session_id:
64+
client.sid = args.session_id
65+
else:
66+
client.sid = input("Please enter sid: ")
6467
test_reply = client.api_call("show-hosts", {"limit": 1})
6568
handle_login_fail(not test_reply.success, "Supplied SID is invalid!")
6669
get_version(client)

0 commit comments

Comments
 (0)