Avoid crash in HW-Diags --quick
* The LogDir wasn't being created before being used.
This commit is contained in:
parent
3d4fc4c3f3
commit
2ff8690a66
1 changed files with 8 additions and 4 deletions
|
|
@ -623,14 +623,18 @@ class State():
|
||||||
v['Objects'] = []
|
v['Objects'] = []
|
||||||
|
|
||||||
# Update LogDir
|
# Update LogDir
|
||||||
if not self.quick_mode:
|
if self.quick_mode:
|
||||||
|
global_vars['LogDir'] = '{}/Logs/{}'.format(
|
||||||
|
global_vars['Env']['HOME'],
|
||||||
|
time.strftime('%Y-%m-%d_%H%M_%z'))
|
||||||
|
else:
|
||||||
global_vars['LogDir'] = '{}/Logs/{}_{}'.format(
|
global_vars['LogDir'] = '{}/Logs/{}_{}'.format(
|
||||||
global_vars['Env']['HOME'],
|
global_vars['Env']['HOME'],
|
||||||
get_ticket_number(),
|
get_ticket_number(),
|
||||||
time.strftime('%Y-%m-%d_%H%M_%z'))
|
time.strftime('%Y-%m-%d_%H%M_%z'))
|
||||||
os.makedirs(global_vars['LogDir'], exist_ok=True)
|
os.makedirs(global_vars['LogDir'], exist_ok=True)
|
||||||
global_vars['LogFile'] = '{}/Hardware Diagnostics.log'.format(
|
global_vars['LogFile'] = '{}/Hardware Diagnostics.log'.format(
|
||||||
global_vars['LogDir'])
|
global_vars['LogDir'])
|
||||||
self.progress_out = '{}/progress.out'.format(global_vars['LogDir'])
|
self.progress_out = '{}/progress.out'.format(global_vars['LogDir'])
|
||||||
|
|
||||||
# Add CPU
|
# Add CPU
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue