mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
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:
parent
a19de553aa
commit
808e7b542f
1 changed files with 2 additions and 2 deletions
|
|
@ -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" % (
|
||||
|
|
|
|||
Loading…
Reference in a new issue