summaryrefslogtreecommitdiff
path: root/utils/fetch_currencies.py
diff options
context:
space:
mode:
authorcclauss <cclauss@bluewin.ch>2017-11-14 06:48:54 +0100
committerGitHub <noreply@github.com>2017-11-14 06:48:54 +0100
commit9984c99665003b95799225e30cb4f9209467d4e5 (patch)
tree428f030793c60297d15b8159e9438be68538b8fd /utils/fetch_currencies.py
parent400e77b7fee3a076c11635c71c16435e2b562fd6 (diff)
downloadsearxng-9984c99665003b95799225e30cb4f9209467d4e5.tar.gz
searxng-9984c99665003b95799225e30cb4f9209467d4e5.zip
print() is a function in Python 3
Diffstat (limited to 'utils/fetch_currencies.py')
-rw-r--r--utils/fetch_currencies.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/fetch_currencies.py b/utils/fetch_currencies.py
index 716b505ee..5605fb387 100644
--- a/utils/fetch_currencies.py
+++ b/utils/fetch_currencies.py
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
+from __future__ import print_function
+
import json
import re
import unicodedata
@@ -38,13 +40,13 @@ def add_currency_name(name, iso4217):
db_names = db['names']
if not isinstance(iso4217, basestring):
- print "problem", name, iso4217
+ print("problem", name, iso4217)
return
name = normalize_name(name)
if name == '':
- print "name empty", iso4217
+ print("name empty", iso4217)
return
iso4217_set = db_names.get(name, None)
@@ -127,7 +129,7 @@ def wdq_query(query):
qlist = map(add_q, jsonresponse.get('items', {}))
error = jsonresponse.get('status', {}).get('error', None)
if error is not None and error != 'OK':
- print "error for query '" + query + "' :" + error
+ print("error for query '" + query + "' :" + error)
fetch_data_batch(qlist)