diff libervia/server/server.py @ 1305:db9ea167c409

pages: `profile` is now exposed to scripts
author Goffi <goffi@goffi.org>
date Thu, 16 Jul 2020 09:08:50 +0200
parents de3b15d68bb6
children eb85ef26cb4a
line wrap: on
line diff
--- a/libervia/server/server.py	Thu Jul 16 09:08:50 2020 +0200
+++ b/libervia/server/server.py	Thu Jul 16 09:08:50 2020 +0200
@@ -1049,7 +1049,9 @@
             log.error(_("/!\\ Session has already a profile, this should NEVER happen!"))
             raise failure.Failure(exceptions.ConflictError("Already active"))
 
-        sat_session.profile = profile
+        # XXX: we force string because python D-Bus has its own string type (dbus.String)
+        #   which may cause trouble when exposing it to scripts
+        sat_session.profile = str(profile)
         self.prof_connected.add(profile)
         cache_dir = os.path.join(
             self.cache_root_dir, "profiles", regex.pathEscape(profile)