audit changes print statemtns and exception prints
This commit is contained in:
parent
d9cc5ece67
commit
88972fc495
|
@ -265,7 +265,7 @@ def run_audit(msg):
|
||||||
with tempfile.TemporaryDirectory() as temp_dir:
|
with tempfile.TemporaryDirectory() as temp_dir:
|
||||||
print("Temporary directory created:", temp_dir)
|
print("Temporary directory created:", temp_dir)
|
||||||
temp_filename = os.path.join(temp_dir, 'script_json_file.json')
|
temp_filename = os.path.join(temp_dir, 'script_json_file.json')
|
||||||
print(temp_filename)
|
print("temp file name ----------------?>",temp_filename)
|
||||||
with open(temp_filename, 'w') as json_file:
|
with open(temp_filename, 'w') as json_file:
|
||||||
json.dump(script_json, json_file, indent=4)
|
json.dump(script_json, json_file, indent=4)
|
||||||
script_json = {}
|
script_json = {}
|
||||||
|
@ -277,7 +277,10 @@ def run_audit(msg):
|
||||||
script_json["script_file"] = hash2
|
script_json["script_file"] = hash2
|
||||||
script_json["type"] = "script-json"
|
script_json["type"] = "script-json"
|
||||||
audit_data["script-json"] = script_json
|
audit_data["script-json"] = script_json
|
||||||
|
print("data_uploaded")
|
||||||
except:
|
except:
|
||||||
|
print("###ERROR:",exp)
|
||||||
|
print("######Error from JSON CREATION############")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
script_csv = {}
|
script_csv = {}
|
||||||
|
@ -309,7 +312,8 @@ def run_audit(msg):
|
||||||
|
|
||||||
to_email = [user.email]
|
to_email = [user.email]
|
||||||
email_code = 'SB1'
|
email_code = 'SB1'
|
||||||
sendmail(to_email=to_email , email_code=email_code)
|
key_value_aud = { "script_name" : str(screenplay_name)}
|
||||||
|
sendmail(to_email=to_email , email_code=email_code, key_value = key_value_aud)
|
||||||
|
|
||||||
# user_infos = user_info(tx_hash=Response,service="Script Audit",gas_fee=gasprice)
|
# user_infos = user_info(tx_hash=Response,service="Script Audit",gas_fee=gasprice)
|
||||||
# addition_result = user_infos.update_info(request)
|
# addition_result = user_infos.update_info(request)
|
||||||
|
@ -360,7 +364,8 @@ def run_audit(msg):
|
||||||
|
|
||||||
to_email = [user.email]
|
to_email = [user.email]
|
||||||
email_code = 'SB2'
|
email_code = 'SB2'
|
||||||
sendmail(to_email=to_email , email_code=email_code)
|
key_value_aud = { "script_name" : str(screenplay_name)}
|
||||||
|
sendmail(to_email=to_email , email_code=email_code, key_value = key_value_aud ))
|
||||||
|
|
||||||
Response = UploadScriptAuditData(OWNER_KEY,blockchain_obj.publicKey,blockchain_obj.user_id,script_id,str(audit_data))
|
Response = UploadScriptAuditData(OWNER_KEY,blockchain_obj.publicKey,blockchain_obj.user_id,script_id,str(audit_data))
|
||||||
print("tx_hash",Response)
|
print("tx_hash",Response)
|
||||||
|
|
Loading…
Reference in New Issue