MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / EchoCommand

Class EchoCommand

keepercommander/commands/utils.py:1992–2010  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1990
1991
1992class EchoCommand(Command):
1993 def get_parser(self):
1994 return echo_parser
1995
1996 def execute(self, params, **kwargs):
1997 argument = kwargs.get('argument')
1998 if argument:
1999 print(argument)
2000 else:
2001 envs = {LAST_RECORD_UID, LAST_FOLDER_UID, LAST_SHARED_FOLDER_UID}
2002 for name in params.environment_variables:
2003 envs.add(name)
2004 names = [x for x in envs]
2005 names.sort()
2006 for name in names:
2007 if name in params.environment_variables:
2008 print('${{{0}}} = "{1}"'.format(name, params.environment_variables[name] ))
2009 else:
2010 print('${{{0}}} ='.format(name))
2011
2012
2013class SetCommand(Command):

Callers 1

register_commandsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected