Skip to content

Commit

Permalink
Studio base/Studio API: return None if Studio is not running. Re #155.
Browse files Browse the repository at this point in the history
Caught by Mypy: return None if Studio is not running to make it consistent with type annotation information.
  • Loading branch information
josephsl committed Jan 26, 2021
1 parent 407074e commit cee8eab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/appModules/splstudio/splbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit cee8eab

Please sign in to comment.