Browse Source

Merge pull request #1083 from cclauss/patch-2

print() is a function in Python 3
Adam Tauber 7 years ago
parent
commit
84e7b8bad1
No account linked to committer's email
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      utils/fetch_currencies.py

+ 5
- 3
utils/fetch_currencies.py View File

1
 # -*- coding: utf-8 -*-
1
 # -*- coding: utf-8 -*-
2
+from __future__ import print_function
3
+
2
 import json
4
 import json
3
 import re
5
 import re
4
 import unicodedata
6
 import unicodedata
38
     db_names = db['names']
40
     db_names = db['names']
39
 
41
 
40
     if not isinstance(iso4217, basestring):
42
     if not isinstance(iso4217, basestring):
41
-        print "problem", name, iso4217
43
+        print("problem", name, iso4217)
42
         return
44
         return
43
 
45
 
44
     name = normalize_name(name)
46
     name = normalize_name(name)
45
 
47
 
46
     if name == '':
48
     if name == '':
47
-        print "name empty", iso4217
49
+        print("name empty", iso4217)
48
         return
50
         return
49
 
51
 
50
     iso4217_set = db_names.get(name, None)
52
     iso4217_set = db_names.get(name, None)
127
     qlist = map(add_q, jsonresponse.get('items', {}))
129
     qlist = map(add_q, jsonresponse.get('items', {}))
128
     error = jsonresponse.get('status', {}).get('error', None)
130
     error = jsonresponse.get('status', {}).get('error', None)
129
     if error is not None and error != 'OK':
131
     if error is not None and error != 'OK':
130
-        print "error for query '" + query + "' :" + error
132
+        print("error for query '" + query + "' :" + error)
131
 
133
 
132
     fetch_data_batch(qlist)
134
     fetch_data_batch(qlist)
133
 
135