Added UTF-8 encoding of strings

This commit is contained in:
Illia Chub 2021-01-05 13:35:33 +02:00
parent 57b3cebe0a
commit cc46c37c78

View file

@ -20,6 +20,7 @@ def getDkimKey():
catProcess = subprocess.Popen(["cat", "/var/dkim/" + domain + ".selector.txt"], stdout=subprocess.PIPE) catProcess = subprocess.Popen(["cat", "/var/dkim/" + domain + ".selector.txt"], stdout=subprocess.PIPE)
dkim = catProcess.communicate()[0] dkim = catProcess.communicate()[0]
dkim = base64.b64encode(dkim) dkim = base64.b64encode(dkim)
dkim = str(dkim, 'utf-8')
print(dkim) print(dkim)
return "1" #jsonify(dkim) return "1" #jsonify(dkim)
@app.route("/pythonVersion", methods=["GET"]) @app.route("/pythonVersion", methods=["GET"])