mgr/dashboard: fix error handling in remote_view_cache

Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
John Spray 2017-06-07 12:50:38 -04:00
parent 4296962edc
commit f23c68f168

View File

@ -22,13 +22,12 @@ class GetterThread(Thread):
self._view.value = None
self._view.value_when = None
self._view.getter_thread = None
self.event.set()
with self._view.lock:
self._view.latency = t1 - t0
self._view.value = val
self._view.value_when = datetime.datetime.now()
self._view.getter_thread = None
else:
with self._view.lock:
self._view.latency = t1 - t0
self._view.value = val
self._view.value_when = datetime.datetime.now()
self._view.getter_thread = None
self.event.set()
@ -133,4 +132,4 @@ class RemoteViewCache(object):
pass
def _get(self):
raise NotImplementedError()
raise NotImplementedError()