(self, args, **kwargs)
| 87 | |
| 88 | class PackResourceCommand(resource.ResourceCommand): |
| 89 | def run_and_print(self, args, **kwargs): |
| 90 | try: |
| 91 | instance = self.run(args, **kwargs) |
| 92 | if not instance: |
| 93 | raise resource.ResourceNotFoundError("No matching items found") |
| 94 | self.print_output( |
| 95 | instance, |
| 96 | table.PropertyValueTable, |
| 97 | attributes=["all"], |
| 98 | json=args.json, |
| 99 | yaml=args.yaml, |
| 100 | ) |
| 101 | except resource.ResourceNotFoundError: |
| 102 | print("No matching items found") |
| 103 | except Exception as e: |
| 104 | message = six.text_type(e) |
| 105 | print("ERROR: %s" % (message)) |
| 106 | raise OperationFailureException(message) |
| 107 | |
| 108 | |
| 109 | class PackAsyncCommand(ActionRunCommandMixin, resource.ResourceCommand): |
nothing calls this directly
no test coverage detected