Skip to content

Commit

Permalink
dns/ddclient - import netcup dns api additions discussed in #3549
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Feb 11, 2024
1 parent 50faea3 commit 85d432a
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -121,7 +121,7 @@ def _logout(self):
'action': 'logout',
'param': {
'customernumber': self._account['username'],
'apikey': self.netcupAPIKey,
'apikey': self.settings['APIKey'],
'apisessionid': self.netcupAPISessionID
}
}
Expand Down Expand Up @@ -162,7 +162,7 @@ def _createRequestPayload(self, action, extraParameters={}):
'param': {
'domainname': self.domain,
'customernumber': self._account['username'],
'apikey': self.netcupAPIKey,
'apikey': self.settings['APIKey'],
'apisessionid': self.netcupAPISessionID,
}
}
Expand All @@ -175,8 +175,8 @@ def _sendRequest(self, payload):
resp = req.json()
except requests.exceptions.JSONDecodeError:
resp = {}
if resp.get('status', '') == 'success' and resp.get('responsedata', None):
return resp['responsedata']
if resp.get('status', '') == 'success':
return resp.get('responsedata', {})
else:
syslog.syslog(
syslog.LOG_ERR,
Expand Down

0 comments on commit 85d432a

Please sign in to comment.