@@ -19,17 +19,17 @@ def readUrl(name):
19
19
jcont = json .loads (content )
20
20
return jcont ;
21
21
except urllib2 .HTTPError , e :
22
- print 'HTTPError = ' + str (e .code )
22
+ print ( 'HTTPError = ' + str (e .code ) )
23
23
raise e
24
24
except urllib2 .URLError , e :
25
- print 'URLError = ' + str (e .reason )
25
+ print ( 'URLError = ' + str (e .reason ) )
26
26
raise e
27
27
except httplib .HTTPException , e :
28
- print 'HTTPException = ' + str (e )
28
+ print ( 'HTTPException = ' + str (e ) )
29
29
raise e
30
30
except Exception :
31
31
import traceback
32
- print 'generic exception: ' + traceback .format_exc ()
32
+ print ( 'generic exception: ' + traceback .format_exc () )
33
33
raise IOError
34
34
35
35
def postUrl (name , body ):
@@ -43,16 +43,16 @@ def postUrl(name, body):
43
43
jcont = json .loads (content )
44
44
return jcont ;
45
45
except urllib2 .HTTPError , e :
46
- print 'HTTPError = ' + str (e .code )
47
- print str (e )
46
+ print ( 'HTTPError = ' + str (e .code ) )
47
+ print ( str (e ) )
48
48
raise e
49
49
except urllib2 .URLError , e :
50
- print 'URLError = ' + str (e .reason )
50
+ print ( 'URLError = ' + str (e .reason ) )
51
51
raise e
52
52
except httplib .HTTPException , e :
53
- print 'HTTPException = ' + str (e )
53
+ print ( 'HTTPException = ' + str (e ) )
54
54
raise e
55
55
except Exception :
56
56
import traceback
57
- print 'generic exception: ' + traceback .format_exc ()
57
+ print ( 'generic exception: ' + traceback .format_exc () )
58
58
raise IOError
0 commit comments