Skip to content

Commit

Permalink
fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingo Lafrenz committed Feb 8, 2024
1 parent f087d6e commit f5edae4
Showing 1 changed file with 3 additions and 3 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,7 +175,7 @@ def _sendRequest(self, payload):
resp = req.json()
except requests.exceptions.JSONDecodeError:
resp = {}
if resp.get('status', '') == 'success' and resp.get('responsedata', None):
if resp.get('status', '') == 'success':
return resp['responsedata']
else:
syslog.syslog(
Expand Down

0 comments on commit f5edae4

Please sign in to comment.