Skip to content

Commit

Permalink
Handle automatic creation of directory if not present
Browse files Browse the repository at this point in the history
  • Loading branch information
anandhu-eng authored Oct 25, 2024
1 parent d9df89e commit 2ba7bec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions script/get-platform-details/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def preprocess(i):
if env.get('CM_PLATFORM_DETAILS_DIR_PATH', '') == '':
env['CM_PLATFORM_DETAILS_FILE_PATH'] = os.path.join(os.getcwd(), "system_info.txt")
else:
if not os.path.exists(env['CM_PLATFORM_DETAILS_DIR_PATH']):
os.makedirs(env['CM_PLATFORM_DETAILS_DIR_PATH'])
env['CM_PLATFORM_DETAILS_FILE_PATH'] = os.path.join(env['CM_PLATFORM_DETAILS_DIR_PATH'], "system_info.txt")


Expand Down

0 comments on commit 2ba7bec

Please sign in to comment.