Skip to content

Commit ceae3a0

Browse files
authored
Handle PermissionError while listing available simulators (#820)
1 parent b0dd58a commit ceae3a0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

vunit/sim_if/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,10 @@ def isfile(file_name):
316316
Case insensitive Path.is_file()
317317
"""
318318
fpath = Path(file_name)
319-
if not fpath.is_file():
319+
try:
320+
if not fpath.is_file():
321+
return False
322+
except PermissionError:
320323
return False
321324

322325
return str(fpath.name) in listdir(str(fpath.parent))

0 commit comments

Comments
 (0)