#!/bin/python3 # ## Wizard Kit: SMART attributes display for ddrescue TUI import os import sys import time # Init os.chdir(os.path.dirname(os.path.realpath(__file__))) sys.path.append(os.getcwd()) from functions.hw_diags import * init_global_vars() if __name__ == '__main__': try: # Prep clear_screen() state = State() state.init() # Find disk disk = None for d in state.disks: if d.path == sys.argv[1]: disk = d # Show details clear_screen() if disk: for line in disk.generate_attribute_report(timestamp=True): print(line) else: print_error('Disk "{}" not found'.format(sys.argv[1])) # Done exit_script() except SystemExit: pass except: major_exception() # vim: sts=2 sw=2 ts=2