mirror of
				https://github.com/searxng/searxng.git
				synced 2025-11-04 03:27:06 -05:00 
			
		
		
		
	Merge pull request #1083 from cclauss/patch-2
print() is a function in Python 3
This commit is contained in:
		
						commit
						84e7b8bad1
					
				@ -1,4 +1,6 @@
 | 
				
			|||||||
# -*- coding: utf-8 -*-
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					from __future__ import print_function
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import json
 | 
					import json
 | 
				
			||||||
import re
 | 
					import re
 | 
				
			||||||
import unicodedata
 | 
					import unicodedata
 | 
				
			||||||
@ -38,13 +40,13 @@ def add_currency_name(name, iso4217):
 | 
				
			|||||||
    db_names = db['names']
 | 
					    db_names = db['names']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if not isinstance(iso4217, basestring):
 | 
					    if not isinstance(iso4217, basestring):
 | 
				
			||||||
        print "problem", name, iso4217
 | 
					        print("problem", name, iso4217)
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    name = normalize_name(name)
 | 
					    name = normalize_name(name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if name == '':
 | 
					    if name == '':
 | 
				
			||||||
        print "name empty", iso4217
 | 
					        print("name empty", iso4217)
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    iso4217_set = db_names.get(name, None)
 | 
					    iso4217_set = db_names.get(name, None)
 | 
				
			||||||
@ -127,7 +129,7 @@ def wdq_query(query):
 | 
				
			|||||||
    qlist = map(add_q, jsonresponse.get('items', {}))
 | 
					    qlist = map(add_q, jsonresponse.get('items', {}))
 | 
				
			||||||
    error = jsonresponse.get('status', {}).get('error', None)
 | 
					    error = jsonresponse.get('status', {}).get('error', None)
 | 
				
			||||||
    if error is not None and error != 'OK':
 | 
					    if error is not None and error != 'OK':
 | 
				
			||||||
        print "error for query '" + query + "' :" + error
 | 
					        print("error for query '" + query + "' :" + error)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    fetch_data_batch(qlist)
 | 
					    fetch_data_batch(qlist)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user