Skip to content

Commit

Permalink
improve error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
not-a-feature committed Apr 23, 2024
1 parent 5d73145 commit 2bbba60
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/wd_fw_update/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,9 @@ def get_upgrade_url(

# Check if current firmware is in dependencies
if current_fw_version not in dependencies_list:
print("Current firmware version is not in the dependencies.")
print(f"Please upgrade to one of these versions first: {dependencies_list}")
print(f"The current firmware version {current_fw_version} is not in the dependency")
print(f"list of the new firmware. In order to upgrade to {version}, please")
print(f"upgrade to one of these versions first: {dependencies_list}")
exit(1)

firmware_url = f"{prop_url}{root.findtext('fwfile')}"
Expand Down Expand Up @@ -471,7 +472,7 @@ def wd_fw_update():

# Step 2: Fetch the device list and find the firmware URL
model = model_properties["mn"]

model = "WD_BLACK SN850X 2000GB"
relative_urls = get_fw_url(model=model)

# Step 3: Check firmware version and dependencies
Expand Down

0 comments on commit 2bbba60

Please sign in to comment.