File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
graalpython/com.oracle.graal.python.benchmarks/python Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
- # Copyright (c) 2018, 2024 , Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2018, 2025 , Oracle and/or its affiliates. All rights reserved.
2
2
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
3
#
4
4
# The Universal Permissive License (UPL), Version 1.0
@@ -270,9 +270,10 @@ def get_bench_module(bench_file):
270
270
name = bench_file .rpartition (os .sep )[2 ].partition ("." )[0 ].replace ('.py' , '' )
271
271
directory = bench_file .rpartition (os .sep )[0 ]
272
272
pkg = []
273
- while any (f .endswith ("__init__.py" ) for f in os .listdir (directory )):
274
- directory , slash , postfix = directory .rpartition ("/" )
275
- pkg .insert (0 , postfix )
273
+ if directory :
274
+ while any (f .endswith ("__init__.py" ) for f in os .listdir (directory )):
275
+ directory , slash , postfix = directory .rpartition ("/" )
276
+ pkg .insert (0 , postfix )
276
277
277
278
if pkg :
278
279
sys .path .insert (0 , directory )
You can’t perform that action at this time.
0 commit comments