Skip to content

Commit

Permalink
Support dropping named partitions using string values for size (#2948)
Browse files Browse the repository at this point in the history
When dropping partitions by setting size to zero, string values such as `{"size": "0K"}` do not work. This PR fixes this oversight.
  • Loading branch information
mikee47 authored Mar 10, 2025
1 parent c396b5a commit c898bd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sming/Components/Storage/Tools/hwconfig/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def parse_dict(self, data, devices):
partnames += name
part = self.find_by_name(name)
# Setting size=0 drops partition if it exists
if entry.get('size') == 0:
if parse_int(entry.get('size')) == 0:
if part:
self.remove(part)
continue
Expand Down

0 comments on commit c898bd9

Please sign in to comment.