Mercurial > libervia-web
comparison 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 |
comparison
equal
deleted
inserted
replaced
1304:70e3341d25bf | 1305:db9ea167c409 |
---|---|
1047 sat_session = session_iface.ISATSession(session) | 1047 sat_session = session_iface.ISATSession(session) |
1048 if sat_session.profile: | 1048 if sat_session.profile: |
1049 log.error(_("/!\\ Session has already a profile, this should NEVER happen!")) | 1049 log.error(_("/!\\ Session has already a profile, this should NEVER happen!")) |
1050 raise failure.Failure(exceptions.ConflictError("Already active")) | 1050 raise failure.Failure(exceptions.ConflictError("Already active")) |
1051 | 1051 |
1052 sat_session.profile = profile | 1052 # XXX: we force string because python D-Bus has its own string type (dbus.String) |
1053 # which may cause trouble when exposing it to scripts | |
1054 sat_session.profile = str(profile) | |
1053 self.prof_connected.add(profile) | 1055 self.prof_connected.add(profile) |
1054 cache_dir = os.path.join( | 1056 cache_dir = os.path.join( |
1055 self.cache_root_dir, "profiles", regex.pathEscape(profile) | 1057 self.cache_root_dir, "profiles", regex.pathEscape(profile) |
1056 ) | 1058 ) |
1057 # FIXME: would be better to have a global /cache URL which redirect to | 1059 # FIXME: would be better to have a global /cache URL which redirect to |