From cee8eab3098241809fc6bca1c68244e7314b6447 Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Tue, 26 Jan 2021 09:30:45 -0800 Subject: [PATCH] Studio base/Studio API: return None if Studio is not running. Re #155. Caught by Mypy: return None if Studio is not running to make it consistent with type annotation information. --- addon/appModules/splstudio/splbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/appModules/splstudio/splbase.py b/addon/appModules/splstudio/splbase.py index 1cb97841c..f84169131 100644 --- a/addon/appModules/splstudio/splbase.py +++ b/addon/appModules/splstudio/splbase.py @@ -42,7 +42,7 @@ def studioIsRunning(justChecking: bool = False) -> bool: # so really make sure Studio window handle is alive. def studioAPI(arg: int, command: int) -> Optional[int]: if not studioIsRunning(justChecking=True): - return + return None log.debug(f"SPL: Studio API wParem is {arg}, lParem is {command}") val = sendMessage(_SPLWin, 1024, arg, command) log.debug(f"SPL: Studio API result is {val}")