Revision 49837
Added by Sandro La Bruzzo over 6 years ago
modules/dli-service-portal/trunk/eu/dnetlib/es_connector.py | ||
---|---|---|
1 | 1 |
from json import JSONEncoder |
2 |
|
|
3 |
import sys |
|
2 | 4 |
from elasticsearch import Elasticsearch |
3 | 5 |
from elasticsearch_dsl import * |
4 | 6 |
|
... | ... | |
182 | 184 |
return DLIESResponse(total=1, hits=hits) |
183 | 185 |
except Exception as e: |
184 | 186 |
print "Error on getting item" |
185 |
print e
|
|
187 |
print('Error on line {}'.format(sys.exc_info()[-1].tb_lineno), type(e).__name__, e)
|
|
186 | 188 |
return DLIESResponse() |
Also available in: Unified diff
print more info