Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
searx-engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
searx-engine
Commits
84e7b8ba
Unverified
Commit
84e7b8ba
authored
Nov 14, 2017
by
Adam Tauber
Committed by
GitHub
Nov 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1083 from cclauss/patch-2
print() is a function in Python 3
parents
400e77b7
9984c996
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
fetch_currencies.py
utils/fetch_currencies.py
+5
-3
No files found.
utils/fetch_currencies.py
View file @
84e7b8ba
# -*- 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment