From 053fd9cc0c70ee51b799cb1663dc30f67f971bd8 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 6 Mar 2015 11:20:28 -0700 Subject: [PATCH] Adds warnings if the cacert.pem file cannot be found. --- gns3server/crash_report.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gns3server/crash_report.py b/gns3server/crash_report.py index ac930723..cf27b8d1 100644 --- a/gns3server/crash_report.py +++ b/gns3server/crash_report.py @@ -37,7 +37,10 @@ class CrashReport: DSN = "sync+https://50af75d8641d4ea7a4ea6b38c7df6cf9:41d54936f8f14e558066262e2ec8bbeb@app.getsentry.com/38482" if hasattr(sys, "frozen"): cacert = os.path.join(os.getcwd(), "cacert.pem") - DSN += "?ca_certs={}".format(cacert) + if os.path.isfile(cacert): + DSN += "?ca_certs={}".format(cacert) + else: + log.warning("The SSL certificate bundle file could not be found".format(cacert)) _instance = None def __init__(self):