From 417d4d66a13bac5fb861cba14bbd41cb27c33163 Mon Sep 17 00:00:00 2001 From: nd Date: Fri, 1 Nov 2019 20:11:05 +0100 Subject: [PATCH] fix syntax error --- templates/pdns-letsencrypt.py.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/pdns-letsencrypt.py.j2 b/templates/pdns-letsencrypt.py.j2 index 28b7241..019fa4a 100644 --- a/templates/pdns-letsencrypt.py.j2 +++ b/templates/pdns-letsencrypt.py.j2 @@ -19,7 +19,7 @@ def setupdb(): def get_challenge(db, path): c = db.cursor() c.execute('SELECT value FROM challenges WHERE q = ?', (path,)) - result = c.fetchone() + result = c.fetchall() if result: return result else: @@ -43,7 +43,7 @@ def main_query(): stdout.write("example.com. example.example.com. 1 1d 2h 4w 1h\n") else: for i in get_challenge(db, qname.lower()): - stdout.write("DATA\t" + qname + "\t" + qclass + "\tTXT\t1\t" + id + '\t"' + i + '"\n') + stdout.write("DATA\t" + qname + "\t" + qclass + "\tTXT\t1\t" + id + '\t"' + i[0] + '"\n') stdout.write("LOG\tletsencrypt pipe handler got query: '" + data + "'\n") stdout.write("END\n") stdout.flush()