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

Method execute_args

keepercommander/commands/ksm.py:282–299  ·  view source on GitHub ↗
(self, params, args, **kwargs)

Source from the content-addressed store, hash-verified

280 return ksm_parser
281
282 def execute_args(self, params, args, **kwargs):
283 # Route the `usage` verb to its own parser so its many flags stay out of the shared ksm_parser.
284 try:
285 tokens = shlex.split(args) if args else []
286 except ValueError:
287 tokens = []
288 if tokens and tokens[0].lower() == 'usage':
289 raw = normalize_output_param(expand_cmd_args(args, params.environment_variables))
290 try:
291 opts = ksm_usage_parser.parse_args(shlex.split(raw)[1:])
292 except ParseError as e:
293 logging.error(e)
294 return
295 d = {}
296 d.update(kwargs)
297 d.update(opts.__dict__)
298 return KSMCommand.execute_usage(params, **d)
299 return super(KSMCommand, self).execute_args(params, args, **kwargs)
300
301 def execute(self, params, **kwargs):
302

Calls 5

normalize_output_paramFunction · 0.85
expand_cmd_argsFunction · 0.85
execute_usageMethod · 0.80
errorMethod · 0.45
updateMethod · 0.45