Last active
December 14, 2015 03:29
-
-
Save echohack/5021057 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import requests | |
# ...snippet | |
def call_api(url): | |
try: | |
requests.get(url="url") | |
except: | |
socket.error as e: | |
print("Could not open socket: {0}".format(e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment