Skip to content

Commit 8a7955f

Browse files
authored
Make import_test.py debuggable from console output. (keras-team#21033)
Previously, if no wheel was found, the `[-1]` subscript would fail, preventing the `if not whl_path` clause from outputting the error message.
1 parent d7c5d42 commit 8a7955f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

integration_tests/import_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ def setup_package():
2828
whl_path = re.findall(
2929
r"[^\s]*\.whl",
3030
build_process.stdout,
31-
)[-1]
31+
)
3232
if not whl_path:
33+
print(build_process.stdout)
3334
print(build_process.stderr)
3435
raise ValueError("Installing Keras package unsuccessful. ")
35-
return whl_path
36+
return whl_path[-1]
3637

3738

3839
def create_virtualenv():

0 commit comments

Comments
 (0)