Fix minor bugs of get_terminal output caused by a11y tree depth
This commit is contained in:
@@ -176,8 +176,9 @@ def get_terminal_output():
|
||||
# raise NotImplementedError
|
||||
return "Currently not implemented for platform {:}.".format(platform.platform()), 500
|
||||
return jsonify({"output": output, "status": "success"})
|
||||
except:
|
||||
return jsonify({"output": None, "status": "error"})
|
||||
except Exception as e:
|
||||
logger.error("Failed to get terminal output. Error: %s", e)
|
||||
return jsonify({"status": "error", "message": str(e)}), 500
|
||||
|
||||
|
||||
_accessibility_ns_map = {"st": "uri:deskat:state.at-spi.gnome.org"
|
||||
@@ -191,7 +192,7 @@ _accessibility_ns_map = {"st": "uri:deskat:state.at-spi.gnome.org"
|
||||
}
|
||||
|
||||
|
||||
def _create_atspi_node(node: Accessible, depth: int, flag: Optional[str] = None) -> _Element:
|
||||
def _create_atspi_node(node: Accessible, depth: int = 0, flag: Optional[str] = None) -> _Element:
|
||||
if node.getRoleName() == "document spreadsheet":
|
||||
flag = "calc"
|
||||
if node.getRoleName() == "application" and node.name=="Thunderbird":
|
||||
|
||||
Reference in New Issue
Block a user