Merge pull request #1103 from abdnh/win-openfolder

Fix ResourceWarning in openFolder() on Windows
This commit is contained in:
Damien Elmes 2021-03-30 19:28:12 +10:00 committed by GitHub
commit 49e4dba0d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -688,7 +688,7 @@ def mungeQA(col: Collection, txt: str) -> str:
def openFolder(path: str) -> None: def openFolder(path: str) -> None:
if isWin: if isWin:
subprocess.Popen(["explorer", f"file://{path}"]) subprocess.run(["explorer", f"file://{path}"], check=False)
else: else:
with noBundledLibs(): with noBundledLibs():
QDesktopServices.openUrl(QUrl(f"file://{path}")) QDesktopServices.openUrl(QUrl(f"file://{path}"))