diff --git a/camilladsp/camilladsp.py b/camilladsp/camilladsp.py index 239b55d..965fe32 100644 --- a/camilladsp/camilladsp.py +++ b/camilladsp/camilladsp.py @@ -14,7 +14,7 @@ import json import math -from typing import Dict, Tuple, List, Optional +from typing import Dict, Tuple, List, Optional, Union from threading import Lock import yaml from websocket import create_connection, WebSocket # type: ignore @@ -77,7 +77,7 @@ def query(self, command: str, arg=None): raise IOError("Lost connection to CamillaDSP") from err return self._handle_reply(command, rawrepl) - def _handle_reply(self, command: str, rawreply: str|bytes): + def _handle_reply(self, command: str, rawreply: Union[str, bytes]): try: reply = json.loads(rawreply) value = None