Mercurial > libervia-backend
changeset 3126:2b0f739f8a46
plugin manhole: added "C" to namespace
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 26 Jan 2020 18:08:10 +0100 (2020-01-26) |
parents | c3ce8c997fdf |
children | 2798c86412e1 |
files | sat/memory/params.py sat/plugins/plugin_dbg_manhole.py sat/plugins/plugin_misc_debug.py |
diffstat | 3 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/memory/params.py Sun Jan 26 18:08:09 2020 +0100 +++ b/sat/memory/params.py Sun Jan 26 18:08:10 2020 +0100 @@ -218,7 +218,8 @@ @param profile_key: profile name or key which can be C.PROF_KEY_ALL for all profiles C.PROF_KEY_DEFAULT for default profile - @param return_profile_keys: if True, return unmanaged profile keys (like C.PROF_KEY_ALL). This keys must be managed by the caller + @param return_profile_keys: if True, return unmanaged profile keys (like + C.PROF_KEY_ALL). This keys must be managed by the caller @return: requested profile name @raise exceptions.ProfileUnknownError: profile doesn't exists @raise exceptions.ProfileNotSetError: if C.PROF_KEY_NONE is used
--- a/sat/plugins/plugin_dbg_manhole.py Sun Jan 26 18:08:09 2020 +0100 +++ b/sat/plugins/plugin_dbg_manhole.py Sun Jan 26 18:08:10 2020 +0100 @@ -57,6 +57,7 @@ f = protocol.ServerFactory() namespace = { "host": self.host, + "C": C, "jid": jid, } f.protocol = lambda: TelnetTransport(TelnetBootstrapProtocol,
--- a/sat/plugins/plugin_misc_debug.py Sun Jan 26 18:08:09 2020 +0100 +++ b/sat/plugins/plugin_misc_debug.py Sun Jan 26 18:08:10 2020 +0100 @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # SàT plugin for managing raw XML log # Copyright (C) 2009-2016 Jérôme Poisson (goffi@goffi.org) @@ -17,12 +16,13 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +import json from sat.core.i18n import _ from sat.core.log import getLogger +from sat.core.constants import Const as C + log = getLogger(__name__) -from sat.core.constants import Const as C -import json PLUGIN_INFO = { C.PI_NAME: "Debug Plugin",