Skip to content

Commit c898bd9

Browse files
authored
Support dropping named partitions using string values for size (#2948)
When dropping partitions by setting size to zero, string values such as `{"size": "0K"}` do not work. This PR fixes this oversight.
1 parent c396b5a commit c898bd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sming/Components/Storage/Tools/hwconfig/partition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def parse_dict(self, data, devices):
144144
partnames += name
145145
part = self.find_by_name(name)
146146
# Setting size=0 drops partition if it exists
147-
if entry.get('size') == 0:
147+
if parse_int(entry.get('size')) == 0:
148148
if part:
149149
self.remove(part)
150150
continue

0 commit comments

Comments
 (0)