Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix folder exists error #92

Merged
merged 1 commit into from
Jul 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/memcheck_xml2junit_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
# JUnit xml file.
#
import argparse
import errno
import os
import xml.etree.ElementTree as ET

Expand All @@ -65,7 +66,11 @@ def get_testcase_preamble(name, close=False):
args = parser.parse_args()

if not os.path.exists(args.output_directory):
os.mkdir(args.output_directory)
try:
os.mkdir(args.output_directory)
except OSError as e:
if e.errno != errno.EEXIST:
raise

for subdir, dirs, files in os.walk(args.input_directory):
if os.path.basename(subdir) == os.path.basename(args.output_directory):
Expand Down