From b7bd8fefe863042b7a0e061115c6b6c068c077ed Mon Sep 17 00:00:00 2001 From: stonebig Date: Mon, 21 Nov 2022 21:36:02 +0100 Subject: [PATCH] remove osp from qthelpers.py --- winpython/qthelpers.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/winpython/qthelpers.py b/winpython/qthelpers.py index a7ac4ee3..e16c85f1 100644 --- a/winpython/qthelpers.py +++ b/winpython/qthelpers.py @@ -48,7 +48,7 @@ import os import re -import os.path as osp +# import os.path as osp from pathlib import Path import sys @@ -157,10 +157,12 @@ def _process_mime_path(path, extlist): path = path[5:] else: path = path[7:] - if osp.exists(path): + # if osp.exists(path): + if Path(path).exists(): if ( extlist is None - or osp.splitext(path)[1] in extlist + #or osp.splitext(path)[1] in extlist + or Path(path).suffix in extlist ): return path