Skip to content

Commit 978c124

Browse files
author
Daniel james
committed
Addresses bug where the PowerDNS API location is at /api/v1 and not at /, causing the library to fail with 404 error. Closes issue Nosmoht#6 (Nosmoht#6)
1 parent bceeb4c commit 978c124

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

powerdns_record.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(self, url, status_code, message):
8787

8888
class PowerDNSClient:
8989
def __init__(self, host, port, prot, api_key):
90-
self.url = '{prot}://{host}:{port}'.format(prot=prot, host=host, port=port)
90+
self.url = '{prot}://{host}:{port}/api/v1'.format(prot=prot, host=host, port=port)
9191
self.headers = {'X-API-Key': api_key,
9292
'content-type': 'application/json',
9393
'accept': 'application/json'

powerdns_zone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __init__(self, url, status_code, message):
8080

8181
class PowerDNSClient:
8282
def __init__(self, host, port, prot, api_key):
83-
self.url = '{prot}://{host}:{port}'.format(prot=prot, host=host, port=port)
83+
self.url = '{prot}://{host}:{port}/api/v1'.format(prot=prot, host=host, port=port)
8484
self.headers = {'X-API-Key': api_key,
8585
'content-type': 'application/json',
8686
'accept': 'application/json'

0 commit comments

Comments
 (0)