changeset 3056:49c7bc3afb2b

core (log): removed Android hack: this hack is not needed anymore with Python 3 port and was actually causing a crash.
author Goffi <goffi@goffi.org>
date Wed, 16 Oct 2019 08:39:35 +0200
parents 82eee2c383d9
children f91d0e6d9b13
files sat/core/log_config.py
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/sat/core/log_config.py	Fri Oct 11 16:15:34 2019 +0200
+++ b/sat/core/log_config.py	Wed Oct 16 08:39:35 2019 +0200
@@ -333,7 +333,6 @@
     def configureFormat(self, fmt):
         super(ConfigureStandard, self).configureFormat(fmt)
         import logging
-        import sys
 
         class SatFormatter(logging.Formatter):
             """Formatter which manage SàT specificities"""
@@ -359,12 +358,7 @@
                 s = super(SatFormatter, self).format(record)
                 if do_color:
                     s = ConfigureStandard.ansiColors(record.levelname, s)
-                if sys.platform == "android":
-                    # FIXME: dirty hack to workaround android encoding issue on log
-                    #        need to be fixed properly
-                    return s.encode("ascii", "ignore")
-                else:
-                    return s
+                return s
 
         self.formatterClass = SatFormatter