Added response encoding

This commit is contained in:
Illia Chub 2021-01-05 13:09:23 +02:00
parent 7af2affaa8
commit f9260fd1d0

View file

@ -19,6 +19,7 @@ def getDkimKey():
domain = domain.rstrip("\n") domain = domain.rstrip("\n")
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 = str(dkim, "utf-8")
dkim = base64.b64encode(dkim) dkim = base64.b64encode(dkim)
print(dkim) print(dkim)
return jsonify(dkim) return jsonify(dkim)