ddclient: Domeneshop - use '==' instead of 'is' (#3841)

Since Python 3.8, 'is' and 'is not' produce warnings when its
behavior is undefined by the language spec.

See: https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-python-behavior
This commit is contained in:
Sohum 2024-02-26 08:14:18 -07:00 committed by GitHub
parent a19de553aa
commit 808e7b542f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,7 +67,7 @@ class Domeneshop(BaseAccount):
response = requests.get(**req_opts)
# Parse response and update state and log
if response.status_code is 204:
if response.status_code == 204:
if self.is_verbose:
syslog.syslog(
syslog.LOG_NOTICE,
@ -75,7 +75,7 @@ class Domeneshop(BaseAccount):
)
self.update_state(address=self.current_address, status=response.text.split()[0] if response.text else '')
return True
elif response.status_code is 404:
elif response.status_code == 404:
syslog.syslog(
syslog.LOG_ERR,
"Account %s failed to set new ip %s [%d - %s], because %s could not be found" % (