ruff: enable TRY rules
This commit is contained in:
parent
557af7b692
commit
c248aa7496
3 changed files with 11 additions and 2 deletions
|
@ -141,9 +141,10 @@ open = kopen # TODO deprecate
|
|||
def kexists(path: PathIsh, subpath: str) -> bool:
|
||||
try:
|
||||
kopen(path, subpath)
|
||||
return True
|
||||
except Exception:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
import zipfile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue