Lightning Wire Labs: Fix comparing HTTP status codes.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Jun 2014 22:03:14 +0000 (00:03 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Jun 2014 22:03:14 +0000 (00:03 +0200)
These are integers and need to be compared with integers.

src/ddns/providers.py

index f95aa2a..b0b3bf7 100644 (file)
@@ -281,9 +281,9 @@ class DDNSProviderLightningWireLabs(DDNSProvider):
                        return
 
                # Handle error codes.
-               if response.code == "403":
+               if response.code == 403:
                        raise DDNSAuthenticationError
-               elif response.code == "400":
+               elif response.code == 400:
                        raise DDNSRequestError
 
                # If we got here, some other update error happened.