Skip to content

Instantly share code, notes, and snippets.

@pushmon pushmon/gist:1886414
Created Feb 22, 2012

What would you like to do?
import urllib2
urlString = ''
handle = urllib2.urlopen(urlString)
except IOError:
print "log error"

This comment has been minimized.

Copy link

paulfurley commented Oct 23, 2014

Probably time to make this Python3 compatible :) You'll need to change line 9 to print("log error") and not use urllib2. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.