summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/send-error-report6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/send-error-report b/scripts/send-error-report
index c99d3876d7..01c292ead1 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -62,6 +62,7 @@ def sendData(json_file, server):
62 g.write(email + "\n") 62 g.write(email + "\n")
63 else: 63 else:
64 print("Invalid inputs, try again.") 64 print("Invalid inputs, try again.")
65 sys.exit(1)
65 return 66 return
66 67
67 with open(json_file) as f: 68 with open(json_file) as f:
@@ -74,6 +75,7 @@ def sendData(json_file, server):
74 data = json.dumps(jsondata, indent=4, sort_keys=True) 75 data = json.dumps(jsondata, indent=4, sort_keys=True)
75 except: 76 except:
76 print("Invalid json data") 77 print("Invalid json data")
78 sys.exit(1)
77 return 79 return
78 80
79 try: 81 try:
@@ -87,12 +89,14 @@ def sendData(json_file, server):
87 print("There was a problem submiting your data, response written in %s.response.html" % json_file) 89 print("There was a problem submiting your data, response written in %s.response.html" % json_file)
88 with open("%s.response.html" % json_file, "w") as f: 90 with open("%s.response.html" % json_file, "w") as f:
89 f.write(res) 91 f.write(res)
92 sys.exit(1)
90 conn.close() 93 conn.close()
91 except Exception as e: 94 except Exception as e:
92 print("Server connection failed: %s" % e) 95 print("Server connection failed: %s" % e)
93 96 sys.exit(1)
94 else: 97 else:
95 print("No data file found.") 98 print("No data file found.")
99 sys.exit(1)
96 100
97 101
98if __name__ == '__main__': 102if __name__ == '__main__':