Skip to content

Commit f7d10bb

Browse files
author
Sumit Chachra
committed
replacing urllib with urllib2
1 parent 2da0f67 commit f7d10bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/facebook.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import cgi
3737
import hashlib
3838
import time
39-
import urllib
39+
import urllib, urllib2
4040

4141
# Find a JSON parser
4242
try:
@@ -168,8 +168,8 @@ def request(self, path, args=None, post_args=None):
168168
else:
169169
args["access_token"] = self.access_token
170170
post_data = None if post_args is None else urllib.urlencode(post_args)
171-
file = urllib.urlopen("https://graph.facebook.com/" + path + "?" +
172-
urllib.urlencode(args), post_data)
171+
file = urllib2.urlopen("https://graph.facebook.com/" + path + "?" +
172+
urllib.urlencode(args), post_data)
173173
try:
174174
response = _parse_json(file.read())
175175
finally:

0 commit comments

Comments
 (0)