MCPcopy Create free account
hub / github.com/StackStorm/st2 / run_and_print

Method run_and_print

st2client/st2client/commands/pack.py:557–577  ·  view source on GitHub ↗
(self, args, **kwargs)

Source from the content-addressed store, hash-verified

555 return result
556
557 def run_and_print(self, args, **kwargs):
558 try:
559 instance = self.run(args, **kwargs)
560 if not instance:
561 raise Exception("Configuration failed")
562 self.print_output(
563 instance,
564 table.PropertyValueTable,
565 attributes=["all"],
566 json=args.json,
567 yaml=args.yaml,
568 )
569 except (KeyboardInterrupt, SystemExit):
570 raise OperationFailureException("Interrupted")
571 except Exception as e:
572 if self.app.client.debug:
573 raise
574
575 message = six.text_type(e)
576 print("ERROR: %s" % (message))
577 raise OperationFailureException(message)

Callers

nothing calls this directly

Calls 3

runMethod · 0.95
print_outputMethod · 0.80

Tested by

no test coverage detected