You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by hu...@apache.org on 2016/03/27 20:10:50 UTC
svn commit: r1736798 - /steve/trunk/pysteve/lib/backends/es.py
Author: humbedooh
Date: Sun Mar 27 18:10:50 2016
New Revision: 1736798
URL: http://svn.apache.org/viewvc?rev=1736798&view=rev
Log:
catch
Modified:
steve/trunk/pysteve/lib/backends/es.py
Modified: steve/trunk/pysteve/lib/backends/es.py
URL: http://svn.apache.org/viewvc/steve/trunk/pysteve/lib/backends/es.py?rev=1736798&r1=1736797&r2=1736798&view=diff
==============================================================================
--- steve/trunk/pysteve/lib/backends/es.py (original)
+++ steve/trunk/pysteve/lib/backends/es.py Sun Mar 27 18:10:50 2016
@@ -210,9 +210,12 @@ class ElasticSearchBackend:
"Get the UID/email for a voter given the vote key hash"
# First, try the raw hash as an ID
- res = self.es.get(index="steve", doc_type="voters", id=votekey)
- if res:
- return res['_source']['uid']
+ try:
+ res = self.es.get(index="steve", doc_type="voters", id=votekey)
+ if res:
+ return res['_source']['uid']
+ except:
+ pass
# Now, look for it as hash inside the doc
try: