diff --git a/plugins/automations.py b/plugins/automations.py index 3452f21..d54794c 100644 --- a/plugins/automations.py +++ b/plugins/automations.py @@ -126,7 +126,7 @@ def automations_background(authentication): account_name = account.check_account(authentication) password = ":".join(authentication.split(":")[1:]) - if account_name == False: + if not account_name: return { "error": { "message": "Invalid account" diff --git a/plugins/batching.py b/plugins/batching.py index 17d97ac..9fe63c1 100644 --- a/plugins/batching.py +++ b/plugins/batching.py @@ -382,7 +382,7 @@ def bid(params, authentication): bid = float(params["bid"]) blind = float(params["blind"]) blind+=bid - except: + except ValueError: return { "status":"Invalid bid amount", "transaction":None diff --git a/plugins/renewal.py b/plugins/renewal.py index 2adc2b0..0956e81 100644 --- a/plugins/renewal.py +++ b/plugins/renewal.py @@ -88,7 +88,7 @@ def main(params, authentication): return {"status": f"Failed: {batch['error']['message']}", "transaction": "None"} if 'result' in batch: - if batch['result'] != None: + if batch['result'] is not None: tx = batch['result']['hash'] return {"status": "Success", "transaction": tx} # Note only one batch can be sent at a time diff --git a/plugins/varo.py b/plugins/varo.py index 4247e46..16d380b 100644 --- a/plugins/varo.py +++ b/plugins/varo.py @@ -93,7 +93,7 @@ def status(params, authentication): response = requests.post(f"https://{instance}/api", json=data, headers=headers) if response.status_code != 200: return {"status": "Error connecting to Varo"} - if response.json()["success"] != True: + if not response.json()["success"]: return {"status": "Error connecting to Varo"} return {"status": f"Connected to {instance}"} @@ -110,7 +110,7 @@ def login(params, authentication): if response.status_code != 200: return {"status": "Error connecting to Varo"} - if response.json()["success"] != True: + if not response.json()["success"]: return {"status": "Error connecting to Varo"} auth = { @@ -146,7 +146,7 @@ def addDomain(params, authentication): zones = requests.post(f"https://{instance}/api", json=data, headers=headers) if zones.status_code != 200: return {"status": "Error connecting to Varo"} - if zones.json()["success"] != True: + if not zones.json()["success"]: return {"status": "Error connecting to Varo"} zones = zones.json()["data"] @@ -169,7 +169,7 @@ def addDomain(params, authentication): response = requests.post(f"https://{instance}/api", json=data, headers=headers) if response.status_code != 200: return {"status": "Error connecting to Varo"} - if response.json()["success"] != True: + if not response.json()["success"]: return {"status": "Error connecting to Varo"} zoneID = response.json()["data"]["zone"] data = { @@ -179,7 +179,7 @@ def addDomain(params, authentication): response = requests.post(f"https://{instance}/api", json=data, headers=headers) if response.status_code != 200: return {"status": "Error connecting to Varo"} - if response.json()["success"] != True: + if not response.json()["success"]: return {"status": "Error connecting to Varo"} zone = response.json()["data"]