Skip to content
Snippets Groups Projects
Commit 547cded0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ldrp_v2: Create folder before creating a file"

parents b6e207a1 facbe0c7
No related branches found
No related tags found
No related merge requests found
...@@ -676,6 +676,9 @@ class RamDump(): ...@@ -676,6 +676,9 @@ class RamDump():
file_path = os.path.join(self.outdir, file_name) file_path = os.path.join(self.outdir, file_name)
f = None f = None
try: try:
dir_path = os.path.dirname(file_path)
if not os.path.exists(dir_path) and 'w' in mode:
os.makedirs(dir_path)
f = open(file_path, mode) f = open(file_path, mode)
except: except:
print_out_str('Could not open path {0}'.format(file_path)) print_out_str('Could not open path {0}'.format(file_path))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment