dwipe 1.0.2__tar.gz → 1.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dwipe
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: A tool to wipe disks and partitions for Linux
5
5
  Author-email: Joe Defen <joedef@google.com>
6
6
  License: MIT
@@ -47,7 +47,7 @@ build-backend = "setuptools.build_meta"
47
47
 
48
48
  [project]
49
49
  name = "dwipe"
50
- version = "1.0.2"
50
+ version = "1.0.3"
51
51
  description = "A tool to wipe disks and partitions for Linux"
52
52
  authors = [
53
53
  { name = "Joe Defen", email = "joedef@google.com" }
@@ -307,6 +307,7 @@ class DeviceInfo:
307
307
  state = 'W' if pct >= 100 else 's'
308
308
  dt = datetime.datetime.fromtimestamp(marker.unixtime)
309
309
  entry.marker = f'{state} {pct}% {marker.mode} {dt.strftime('%Y/%m/%d %H:%M')}'
310
+ entry.state = state
310
311
 
311
312
  return entry
312
313
 
@@ -333,8 +334,6 @@ class DeviceInfo:
333
334
  if entry.mounts:
334
335
  entry.state = 'Mnt'
335
336
  parent.state = 'Mnt'
336
- elif entry.marker:
337
- entry.state = entry.marker[0]
338
337
 
339
338
  if self.DB:
340
339
  print('\n\nDB: --->>> after parse_lsblk:')
@@ -532,18 +531,21 @@ class DeviceInfo:
532
531
  if new_ns:
533
532
  if prev_ns.job:
534
533
  new_ns.job = prev_ns.job
535
- new_ns.state = new_ns.dflt = prev_ns.dflt
534
+ new_ns.dflt = prev_ns.dflt
535
+
536
536
  if prev_ns.state == 'Lock':
537
- pass
538
- if prev_ns.state not in ('Busy', 'Unlk'): # re-infer these
539
- new_ns.state = prev_ns.state
537
+ new_ns.state = 'Lock'
538
+ elif new_ns.state not in ('s', 'W'):
539
+ new_ns.state = new_ns.dflt
540
+ if prev_ns.state not in ('s', 'W', 'Busy', 'Unlk'):
541
+ new_ns.state = prev_ns.state # re-infer these
540
542
  elif prev_ns.job:
541
543
  # unplugged device with job..
542
544
  nss[name] = prev_ns # carry forward
543
545
  prev_ns.job.do_abort = True
544
- for name, prev_ns in nss.items():
545
- if name not in prev_nss:
546
- prev_ns.state = '^'
546
+ for name, new_ns in nss.items():
547
+ if name not in prev_nss and new_ns.state not in ('s', 'W'):
548
+ new_ns.state = '^'
547
549
  return nss
548
550
 
549
551
  def assemble_partitions(self, prev_nss=None):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dwipe
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: A tool to wipe disks and partitions for Linux
5
5
  Author-email: Joe Defen <joedef@google.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes