From c9f8a8237d2a1a364adcdb9ac546ada7de8345db Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 20 Sep 2023 22:21:00 +1000 Subject: [PATCH] main: Add code block for tlsa info --- master/main.py | 2 +- worker/main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/master/main.py b/master/main.py index 9d60a94..49608e7 100644 --- a/master/main.py +++ b/master/main.py @@ -554,7 +554,7 @@ def success(): if "tlsa" in json: tlsa = json['tlsa'] - return render_template('success.html', title="Your site is ready!",message="Success
Domain: " + domain + "
IP: " + publicIP + "
TLSA: " + tlsa + "
Make sure to add the TLSA record to `_443._tcp." + domain + "` or `*." + domain + "`") + return render_template('success.html', title="Your site is ready!",message="Success
Domain: " + domain + "
IP: " + publicIP + "
TLSA: " + tlsa + "
Make sure to add the TLSA record to _443._tcp." + domain + " or *." + domain + "") else: return render_template('success.html', title="Your site is installing.
Please wait...",message="Domain: " + domain + "
IP: " + publicIP + "
TLSA: Pending
No TLSA record found") diff --git a/worker/main.py b/worker/main.py index cdb9c62..f9c1140 100644 --- a/worker/main.py +++ b/worker/main.py @@ -44,8 +44,8 @@ def tlsa(): tlsa_file = open('wordpress-'+domain+'/tlsa.txt', 'r') tlsa = tlsa_file.readlines() tlsa_file.close() - except FileNotFoundError: - return jsonify({'error': 'TLSA record not found', 'success': 'false'}) + except FileNotFoundError as e: + return jsonify({'error': 'TLSA record not found', 'success': 'false', 'ex': str(e)}) # Remove newlines tlsa = tlsa[0].strip('\n')