Fixed missing parameter bug
This commit is contained in:
parent
2ecff9e0d5
commit
b16d6ca175
@ -41,7 +41,7 @@ class CloudflairAPI:
|
||||
def get_missing_config_var(self):
|
||||
keys = ("domain_name", "cf_api_key", "cf_zone_id", "cf_record_id")
|
||||
missing_parameter = next(
|
||||
(key for key in keys if getattr(self, key) is None),
|
||||
(key for key in keys if not getattr(self, key)),
|
||||
None
|
||||
)
|
||||
return missing_parameter
|
||||
@ -225,8 +225,4 @@ def main():
|
||||
# 0 - Success
|
||||
# 1 - An error occurred
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
sys.exit(main())
|
||||
except Exception as e:
|
||||
print("Exception!!", e)
|
||||
sys.exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user