|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
import argparse |
|
|
|
import json |
|
|
|
|
|
|
|
from os import path |
|
|
|
|
|
|
|
def main(args): |
|
|
|
result_dict = {} |
|
|
@ -10,8 +10,11 @@ def main(args): |
|
|
|
result_dict['rootRequested'] = args.root_access |
|
|
|
result_dict['userName'] = args.user_name |
|
|
|
|
|
|
|
with open(args.pub_key_path, 'r') as stream: |
|
|
|
key_data = stream.read().strip() |
|
|
|
if path.exists(args.pub_key_path): |
|
|
|
with open(args.pub_key_path, 'r') as stream: |
|
|
|
key_data = stream.read().strip() |
|
|
|
else: |
|
|
|
key_data = args.pub_key_path |
|
|
|
|
|
|
|
result_dict['keyData'] = key_data |
|
|
|
|
|
|
|