Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ def boot_to_fastboot(self):
return self.call("boot_to_fastboot")

def _upload_file_if_needed(self, file_path: str, operator: Operator | None = None) -> str:
if not file_path or not file_path.strip():
raise ValueError("File path cannot be empty. Please provide a valid file path.")

if operator is None:
path_buf, operator, operator_scheme = operator_for_path(file_path)
else:
Expand Down Expand Up @@ -91,6 +94,13 @@ def flash(
partitions = {partition: path}
operators = {partition: operator} if isinstance(operator, Operator) else None

for partition_name, file_path in partitions.items():
if not file_path or not file_path.strip():
raise ValueError(
f"Partition '{partition_name}' has an empty file path. "
f"Please provide a valid file path (e.g., -t {partition_name}:/path/to/image)"
)

self.logger.info("Starting RideSX flash operation")

self.boot_to_fastboot()
Expand Down
Loading