mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-10 04:28:31 +00:00
acrn-config: create temporary scenario file folder if it doesn't exist
This commit creates the folder for hosting the temporary scenario .xml files if the folder doesn't exist to avoid the FileNotFound python exception. Tracked-On: #4522 Signed-off-by: Tonny Tzeng <tonny.tzeng@intel.com>
This commit is contained in:
parent
9b6fa69552
commit
ab879407c5
@ -527,6 +527,9 @@ def upload_scenario():
|
||||
tmp_scenario_name = 'tmp_' + scenario_file_name + '.xml'
|
||||
tmp_scenario_file = os.path.join(current_app.config.get('CONFIG_PATH'), board_type,
|
||||
'user_defined', tmp_scenario_name)
|
||||
tmp_scenario_folder = os.path.dirname(tmp_scenario_file)
|
||||
if not os.path.exists(tmp_scenario_folder):
|
||||
os.makedirs(tmp_scenario_folder)
|
||||
if os.path.isfile(tmp_scenario_file):
|
||||
os.remove(tmp_scenario_file)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user