Skip to content

Commit

Permalink
Merge pull request #539 from bongbui321/fix_erase
Browse files Browse the repository at this point in the history
fix erase to return when erase success
  • Loading branch information
bkerler authored Apr 26, 2024
2 parents 2ed24c0 + 9935d48 commit f3e9776
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions edlclient/Library/firehose_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,6 @@ def handle_firehose(self, cmd, options):
luns = self.getluns(options)
partitionname = options["<partitionname>"]
partitions = partitionname.split(",")
error = False
for lun in luns:
data, guid_gpt = self.firehose.get_gpt(lun, int(options["--gpt-num-part-entries"]),
int(options["--gpt-part-entry-size"]),
Expand All @@ -847,14 +846,10 @@ def handle_firehose(self, cmd, options):
self.printer(
f"Erased {partitionname} starting at sector {str(partition.sector)} " +
f"with sector count {str(partition.sectors)}.")
else:
self.printer(
f"Couldn't erase partition {partitionname}. Either wrong memorytype given or no gpt partition.")
error = True
continue
if error:
return False
return True
return True
self.error(
f"Couldn't erase partition {partitionname}. Either wrong memorytype given or no gpt partition.")
return False
elif cmd == "ep":
if not self.check_param(["<partitionname>", "<sectors>"]):
return False
Expand Down

0 comments on commit f3e9776

Please sign in to comment.