Use if __name_ == "__main__"
This commit is contained in:
@@ -68,6 +68,7 @@ def updateCloudflare(zone, email, apiKey, host, ip):
|
|||||||
else:
|
else:
|
||||||
print("Updating failed, errors were: " + str(result["errors"]))
|
print("Updating failed, errors were: " + str(result["errors"]))
|
||||||
|
|
||||||
|
def main():
|
||||||
print(
|
print(
|
||||||
'''
|
'''
|
||||||
------------------------------
|
------------------------------
|
||||||
@@ -143,3 +144,6 @@ else:
|
|||||||
else:
|
else:
|
||||||
print("Cloudflare IP does not match our current IP... Updating Cloudflare.")
|
print("Cloudflare IP does not match our current IP... Updating Cloudflare.")
|
||||||
updateCloudflare(zoneID, authEmail, apiKey, hostToUpdate, ip)
|
updateCloudflare(zoneID, authEmail, apiKey, hostToUpdate, ip)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Reference in New Issue
Block a user