logout;more robust async

This commit is contained in:
Martijn Voncken 2008-01-31 19:11:39 +00:00
parent a23ff6cbca
commit e2eaa9abb4
3 changed files with 8 additions and 1 deletions

View File

@ -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'>

View File

@ -12,6 +12,9 @@ $else:
$_('Off') &nbsp;
$: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'>

View File

@ -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)