Mercurial > libervia-backend
diff frontends/src/quick_frontend/quick_chat.py @ 2089:0931b5a6213c
core, quick_frontends: android compatibility hacks:
a couple of hacks have been used so backend can be launched on android using kivy
- config file (sat.conf) is been read on a specific dir, using a detection of Cagou domains in constants.py
- fixed crash when using sys.stdout.isatty in log_config.py
- Q&D fix for logging encoding issue on android
- when android is detected, the path/pattern to load plugins is modified
- SRV is not working at the moment on android. If the platform is detected, the host is used directly with default port. A hosts_dir configuration can be used in [android] section to map a specific ip to a host
- getRepositoryData in tools/utils return constant string on android. Proper repository data need to be copied during package building.
- [quick app] more robust failure handling on asyncConnect error
- [quick chat] default to utf-8 when getlocale doesn't return the actual locale.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 04 Dec 2016 18:16:48 +0100 |
parents | 3a0a7e5cef49 |
children | 3435e8d2e8e4 |
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_chat.py Sun Dec 04 18:16:37 2016 +0100 +++ b/frontends/src/quick_frontend/quick_chat.py Sun Dec 04 18:16:48 2016 +0100 @@ -122,7 +122,7 @@ # if the message was sent before today, we print the full date timestamp = time.localtime(self.timestamp) time_format = u"%c" if timestamp < self.parent.day_change else u"%H:%M" - return time.strftime(time_format, timestamp).decode(getlocale()[1]) + return time.strftime(time_format, timestamp).decode(getlocale()[1] or 'utf-8') @property def avatar(self): @@ -470,7 +470,7 @@ self._onHistoryPrinted() def _historyGetEb(err): - log.error(_(u"Can't get history")) + log.error(_(u"Can't get history: {}").format(err)) self._onHistoryPrinted() self.host.bridge.historyGet(unicode(self.host.profiles[profile].whoami.bare), unicode(target), size, True, filters, profile, callback=_historyGetCb, errback=_historyGetEb)