CloudSearch: Fix AttributeError when record_stats = False.

While the stub-timer I introduced earlier takes care of some issues, it
doesn't take care of when we explicitly set the variable to None!
This commit is contained in:
Neil Williams
2012-08-23 09:56:53 -07:00
parent c449212f29
commit cc1b087c10

View File

@@ -550,7 +550,8 @@ def basic_query(query=None, bq=None, faceting=None, size=1000,
response)
finally:
connection.close()
timer.stop()
if timer is not None:
timer.stop()
return json.loads(response)