Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
153bc8d8d6
4 changed files with 12 additions and 7 deletions
|
|
@ -30,6 +30,7 @@ from wk.cfg.ddrescue import (
|
|||
from wk.hw import disk as hw_disk
|
||||
from wk.hw.smart import (
|
||||
check_attributes,
|
||||
enable_smart,
|
||||
smart_status_ok,
|
||||
update_smart_details,
|
||||
)
|
||||
|
|
@ -814,6 +815,12 @@ class State():
|
|||
pathlib.Path(self.destination.path),
|
||||
)
|
||||
|
||||
# Update SMART data
|
||||
## TODO: Verify if needed
|
||||
for dev in (self.source, self.destination):
|
||||
enable_smart(dev)
|
||||
update_smart_details(dev)
|
||||
|
||||
# Safety Checks #1
|
||||
if self.mode == 'Clone':
|
||||
self.safety_check_destination()
|
||||
|
|
|
|||
|
|
@ -198,6 +198,9 @@ class State():
|
|||
# Add HW Objects
|
||||
self.system = hw_system.System()
|
||||
self.disks = hw_disk.get_disks(skip_kits=True)
|
||||
for disk in self.disks:
|
||||
hw_smart.enable_smart(disk)
|
||||
hw_smart.update_smart_details(disk)
|
||||
|
||||
# Add test objects
|
||||
for name, details in menu.options.items():
|
||||
|
|
|
|||
|
|
@ -16,10 +16,8 @@ from wk.cfg.python import DATACLASS_DECORATOR_KWARGS
|
|||
from wk.exe import get_json_from_command, run_program
|
||||
from wk.hw.test import Test
|
||||
from wk.hw.smart import (
|
||||
enable_smart,
|
||||
generate_attribute_report,
|
||||
get_known_disk_attributes,
|
||||
update_smart_details,
|
||||
)
|
||||
from wk.std import PLATFORM, color_string, strip_colors
|
||||
|
||||
|
|
@ -64,15 +62,11 @@ class Disk:
|
|||
self.update_details()
|
||||
self.set_description()
|
||||
self.known_attributes = get_known_disk_attributes(self.model)
|
||||
enable_smart(self)
|
||||
update_smart_details(self)
|
||||
if not self.attributes and self.bus == 'USB':
|
||||
# Try using SAT
|
||||
LOG.warning('Using SAT for smartctl for %s', self.path)
|
||||
self.notes = []
|
||||
self.use_sat = True
|
||||
enable_smart(self)
|
||||
update_smart_details(self)
|
||||
self.initial_attributes = copy.deepcopy(self.attributes)
|
||||
if not self.is_4k_aligned():
|
||||
self.add_note('One or more partitions are not 4K aligned', 'YELLOW')
|
||||
|
|
|
|||
|
|
@ -1096,9 +1096,10 @@ def upload_debug_report(report, compress=True, reason='DEBUG'):
|
|||
url = f'{CRASH_SERVER["Url"]}/{filename}'
|
||||
response = requests.put(
|
||||
url,
|
||||
auth=(CRASH_SERVER['User'], CRASH_SERVER.get('Pass', '')),
|
||||
data=xz_report if compress else report,
|
||||
headers=headers,
|
||||
auth=(CRASH_SERVER['User'], CRASH_SERVER.get('Pass', '')),
|
||||
timeout=60,
|
||||
)
|
||||
|
||||
# Check response
|
||||
|
|
|
|||
Loading…
Reference in a new issue