Skip to content

Instantly share code, notes, and snippets.

@lrodorigo
Created September 11, 2016 16:32
Show Gist options
  • Save lrodorigo/30b00c20f5994aaf2911d7443b8f1f15 to your computer and use it in GitHub Desktop.
Save lrodorigo/30b00c20f5994aaf2911d7443b8f1f15 to your computer and use it in GitHub Desktop.
import traceback
import requests
import time
while True:
try:
c = requests.get("http://www.google.com")
print("Connection Alive.")
except Exception:
print(traceback.format_exc())
time.sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment