Skip to content

Commit

Permalink
Do not fail on non-present folders
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-braun committed Sep 17, 2020
1 parent d5dd2e8 commit 691391f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jpype/_jvmfinder.py
Expand Up @@ -145,6 +145,10 @@ def find_possible_homes(self, parents):
java_names = ('jre', 'jdk', 'java')

for parent in parents:
# Fast exit if folder does not exist
if not os.path.exists(parent):
continue

for childname in sorted(os.listdir(parent)):
# Compute the real path
path = os.path.realpath(os.path.join(parent, childname))
Expand Down

0 comments on commit 691391f

Please sign in to comment.