diff cagou/core/kivy_hack.py @ 312:772c170b47a9

Python3 port: /!\ Cagou now runs with Python 3.6+ Port has been done in the same way as for backend (check backend commit b2d067339de3 message for details).
author Goffi <goffi@goffi.org>
date Tue, 13 Aug 2019 19:14:22 +0200
parents ca4daced4638
children 4d660b252487
line wrap: on
line diff
--- a/cagou/core/kivy_hack.py	Mon Aug 05 11:21:54 2019 +0200
+++ b/cagou/core/kivy_hack.py	Tue Aug 13 19:14:22 2019 +0200
@@ -27,11 +27,11 @@
     import sys
     ori_argv = sys.argv[:]
     sys.argv = sys.argv[:1]
-    from constants import Const as C
+    from .constants import Const as C
     from sat.core import log_config
     log_config.satConfigure(C.LOG_BACKEND_STANDARD, C)
 
-    import config
+    from . import config
     kivy_level = config.getConfig(C.CONFIG_SECTION, CONF_KIVY_LEVEL, 'follow').upper()
 
     # kivy handles its own loggers, we don't want that!
@@ -51,7 +51,7 @@
         kivy_logger.setLevel(kivy_level)
         kivy_logger.setLevel = lambda level: None
     else:
-        raise ValueError(u"Unknown value for {name}: {value}".format(name=CONF_KIVY_LEVEL, value=kivy_level))
+        raise ValueError("Unknown value for {name}: {value}".format(name=CONF_KIVY_LEVEL, value=kivy_level))
 
     # during import kivy set its logging stuff
     import kivy