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:
if isWin:
subprocess.Popen(["explorer", f"file://{path}"])
subprocess.run(["explorer", f"file://{path}"], check=False)
else:
with noBundledLibs():
QDesktopServices.openUrl(QUrl(f"file://{path}"))