logout;more robust async
This commit is contained in:
parent
a23ff6cbca
commit
e2eaa9abb4
|
@ -13,6 +13,8 @@ $else:
|
|||
$:render.part_button('POST', '/refresh/on', _('Enable'), 'tango/view-refresh.png')
|
||||
$#end
|
||||
|
||||
$:render.part_button('POST', '/logout', _('Logout'), 'tango/system-log-out.png')
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel" id='stats_panel'>
|
||||
|
|
|
@ -12,6 +12,9 @@ $else:
|
|||
$_('Off')
|
||||
$:render.part_button('POST', '/refresh/on', _('Enable'), 'tango/view-refresh.png')
|
||||
$#end
|
||||
|
||||
$:render.part_button('POST', '/logout', _('Logout'), 'tango/system-log-out.png')
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel" id='stats_panel'>
|
||||
|
|
|
@ -118,12 +118,14 @@ class SyncProxyFunction:
|
|||
self.client = client
|
||||
|
||||
def __call__(self,*args,**kwargs):
|
||||
sync_result = []
|
||||
func = getattr(self.client,self.func_name)
|
||||
|
||||
if self.has_callback(func):
|
||||
sync_result = []
|
||||
func(sync_result.append,*args, **kwargs)
|
||||
self.client.force_call(block=True)
|
||||
if not sync_result:
|
||||
return None
|
||||
return sync_result[0]
|
||||
else:
|
||||
ws.log.debug('no-cb: %s' % self.func_name)
|
||||
|
|
Loading…
Reference in New Issue