Mercurial > libervia-backend
comparison src/core/sat_main.py @ 2167:4b78b4c7f805
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
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 26 Feb 2017 18:23:01 +0100 |
parents | bca699faf416 |
children | 255830fdb80b |
comparison
equal
deleted
inserted
replaced
2166:1b3fbb76984b | 2167:4b78b4c7f805 |
---|---|
34 from sat.tools import utils | 34 from sat.tools import utils |
35 from sat.tools.common import dynamic_import | 35 from sat.tools.common import dynamic_import |
36 from sat.stdui import ui_contact_list, ui_profile_manager | 36 from sat.stdui import ui_contact_list, ui_profile_manager |
37 import sat.plugins | 37 import sat.plugins |
38 from glob import glob | 38 from glob import glob |
39 from uuid import uuid4 | |
40 import sys | 39 import sys |
41 import os.path | 40 import os.path |
42 import uuid | 41 import uuid |
43 | 42 |
44 try: | 43 try: |
731 one_shot(bool): True to delete callback once it have been called | 730 one_shot(bool): True to delete callback once it have been called |
732 @return: id of the registered callback | 731 @return: id of the registered callback |
733 """ | 732 """ |
734 callback_id = kwargs.pop('force_id', None) | 733 callback_id = kwargs.pop('force_id', None) |
735 if callback_id is None: | 734 if callback_id is None: |
736 callback_id = str(uuid4()) | 735 callback_id = str(uuid.uuid4()) |
737 else: | 736 else: |
738 if callback_id in self._cb_map: | 737 if callback_id in self._cb_map: |
739 raise exceptions.ConflictError(_(u"id already registered")) | 738 raise exceptions.ConflictError(_(u"id already registered")) |
740 self._cb_map[callback_id] = (callback, args, kwargs) | 739 self._cb_map[callback_id] = (callback, args, kwargs) |
741 | 740 |