(self, cmd: str)
| 777 | |
| 778 | class ExecuteCommand(RequestHandler): |
| 779 | def post(self, cmd: str): |
| 780 | # TODO: We should parse query strings here, this API is painful. |
| 781 | try: |
| 782 | args = self.json["arguments"] |
| 783 | except APIError: |
| 784 | args = [] |
| 785 | try: |
| 786 | result = self.master.commands.call_strings(cmd, args) |
| 787 | except Exception as e: |
| 788 | self.write({"error": str(e)}) |
| 789 | else: |
| 790 | self.write( |
| 791 | { |
| 792 | "value": result, |
| 793 | # "type": command.typename(type(result)) if result is not None else "none" |
| 794 | } |
| 795 | ) |
| 796 | |
| 797 | |
| 798 | class Events(RequestHandler): |
nothing calls this directly
no test coverage detected