Skip to content

Commit cdc6983

Browse files
committed
directly raise RuntimeError instead of returning None
1 parent bd780c6 commit cdc6983

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/gardenlinux/build/exporter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def _get_default_package_dir() -> pathlib.Path | None:
9090
)
9191
return pathlib.Path(out.stdout.decode().strip())
9292
else:
93-
return None
93+
raise RuntimeError(f"Error: Couldn't identify a default python package directory. Please specifiy one using the --package-dir option. Use -h for more information.")
9494

9595

9696
def export(
@@ -108,8 +108,6 @@ def export(
108108

109109
if not package_dir:
110110
package_dir = _get_default_package_dir()
111-
if not package_dir:
112-
raise RuntimeError(f"Error: Couldn't identify a default python package directory. Please specifiy one using the --package-dir option. Use -h for more information.")
113111
else:
114112
package_dir = pathlib.Path(package_dir)
115113
output_dir = pathlib.Path(output_dir)

0 commit comments

Comments
 (0)