plugin manhole: added "C" to namespace

This commit is contained in:
Goffi 2020-01-26 18:08:10 +01:00
commit 764e247a0a
3 changed files with 6 additions and 4 deletions

View file

@ -218,7 +218,8 @@ class Params(object):
@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

View file

@ -57,6 +57,7 @@ class Manhole(object):
f = protocol.ServerFactory()
namespace = {
"host": self.host,
"C": C,
"jid": jid,
}
f.protocol = lambda: TelnetTransport(TelnetBootstrapProtocol,

View file

@ -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",