Only call gpt under macOS
This commit is contained in:
parent
f0d0ea8164
commit
f1e29cd0c8
1 changed files with 7 additions and 5 deletions
|
|
@ -6,6 +6,7 @@ import atexit
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
@ -281,11 +282,12 @@ class State():
|
||||||
for test in disk.tests:
|
for test in disk.tests:
|
||||||
_f.write(f'\n{test.name}:\n')
|
_f.write(f'\n{test.name}:\n')
|
||||||
_f.write('\n'.join(debug.generate_object_report(test, indent=1)))
|
_f.write('\n'.join(debug.generate_object_report(test, indent=1)))
|
||||||
cmd = [(
|
if platform.system() == 'Darwin':
|
||||||
f'sudo gpt -r show "{disk.path}"'
|
cmd = [(
|
||||||
f' >> {debug_dir}/gpt_{disk.path.name}.info'
|
f'sudo gpt -r show "{disk.path}"'
|
||||||
)]
|
f' >> {debug_dir}/gpt_{disk.path.name}.info'
|
||||||
exe.run_program(cmd, check=False, shell=True)
|
)]
|
||||||
|
exe.run_program(cmd, check=False, shell=True)
|
||||||
|
|
||||||
# osTicket
|
# osTicket
|
||||||
with open(f'{debug_dir}/osTicket.report', 'a', encoding='utf-8') as _f:
|
with open(f'{debug_dir}/osTicket.report', 'a', encoding='utf-8') as _f:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue