From f10fb9efc3a5eeecaa11ea72863ec8334a71a36c Mon Sep 17 00:00:00 2001 From: NikOverflow Date: Sat, 2 Mar 2024 11:42:05 +0100 Subject: [PATCH] feat: let test_ipc_path throw the error. Signed-off-by: NikOverflow --- pypresence/utils.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pypresence/utils.py b/pypresence/utils.py index ede9ccd..463d556 100644 --- a/pypresence/utils.py +++ b/pypresence/utils.py @@ -23,12 +23,8 @@ def remove_none(d: dict): def test_ipc_path(path): '''Tests an IPC pipe to ensure that it actually works''' - try: - with open(path): - return True - except Exception: - return False - + with open(path): + return True # Returns on first IPC pipe matching Discord's def get_ipc_path(pipe=None):