core, frontends: various fixes for Libervia:

- quick_app: don't fail when we can't get autodisconnect parameter
    - bridge: removed useless BridgeFrontend parent class
    - use of TypeError, unicode and list to workaround Pyjamas incompatibilities
This commit is contained in:
Goffi 2017-02-26 18:23:01 +01:00
commit 9b0542fb46
2 changed files with 13 additions and 14 deletions

View file

@ -36,7 +36,6 @@ from sat.tools.common import dynamic_import
from sat.stdui import ui_contact_list, ui_profile_manager
import sat.plugins
from glob import glob
from uuid import uuid4
import sys
import os.path
import uuid
@ -733,7 +732,7 @@ class SAT(service.Service):
"""
callback_id = kwargs.pop('force_id', None)
if callback_id is None:
callback_id = str(uuid4())
callback_id = str(uuid.uuid4())
else:
if callback_id in self._cb_map:
raise exceptions.ConflictError(_(u"id already registered"))

View file

@ -44,7 +44,7 @@ class ANSI(object):
try:
tty = sys.stdout.isatty()
except AttributeError:
except (AttributeError, TypeError): # FIXME: TypeError is here for Pyjamas, need to be removed
tty = False
if not tty:
# we don't want ANSI escape codes if we are not outputing to a tty!