Switch to urllib2.

This commit is contained in:
florentx
2010-08-18 16:47:21 +02:00
parent c002cc77f1
commit 5f09079556
+2 -2
View File
@@ -32,7 +32,7 @@ False
'My .bashrc configuration'
"""
import urllib
import urllib2
try:
import simplejson as json
@@ -123,7 +123,7 @@ class Gists(object):
_url = GIST_JSON % 'gists/%s' % name
# Return a list of Gist objects
return [Gist(json=g) for g in json.load(urllib.urlopen(_url))['gists']]
return [Gist(json=g) for g in json.load(urllib2.urlopen(_url))['gists']]
if __name__ == '__main__':