commit
aab3addc20
|
@ -501,7 +501,8 @@ class EraseBasic(JoinedWithOneDeviceMixin, ActionWithOneDevice):
|
|||
v += '. '
|
||||
if 's' in format_spec:
|
||||
if self.standards:
|
||||
std = 'with standards {}'.format(self.standards)
|
||||
standard = ','.join([x.value for x in self.standards])
|
||||
std = 'with standards {}'.format(standard)
|
||||
else:
|
||||
std = 'no standard'
|
||||
v += 'Method used: {}, {}. '.format(self.method, std)
|
||||
|
@ -527,14 +528,15 @@ class EraseSectors(EraseBasic):
|
|||
steps_random += 1
|
||||
if s.type == 'StepZero':
|
||||
steps_zeros += 1
|
||||
if steps_zeros < 1:
|
||||
|
||||
if steps_zeros == 0 and steps_random == 1:
|
||||
return "Basic"
|
||||
if 0 < steps_random < 3:
|
||||
if steps_zeros == 1 and steps_random == 1:
|
||||
return "Baseline"
|
||||
if steps_random > 2:
|
||||
if steps_zeros == 1 and steps_random == 2:
|
||||
return "Enhanced"
|
||||
|
||||
return "Basic"
|
||||
return "Custom"
|
||||
|
||||
|
||||
class ErasePhysical(EraseBasic):
|
||||
|
|
|
@ -394,6 +394,13 @@ class ErasureStandards(Enum):
|
|||
isinstance(step, actions.StepRandom) for step in other_steps
|
||||
):
|
||||
standards.add(cls.HMG_IS5)
|
||||
|
||||
if len(other_steps) == 2:
|
||||
step1 = isinstance(first_step, actions.StepRandom)
|
||||
step2 = isinstance(other_steps[0], actions.StepZero)
|
||||
step3 = isinstance(other_steps[1], actions.StepRandom)
|
||||
if step1 and step2 and step3:
|
||||
standards.add(cls.HMG_IS5)
|
||||
return standards
|
||||
|
||||
|
||||
|
|
Reference in a new issue