diff options
author | jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> | 2020-12-07 08:05:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 08:05:03 -0800 |
commit | aecdd9c4e00afbcef14b6b81e52eaac971042094 (patch) | |
tree | d9e2c2f87219b58f56d748f423252072a4a63bce /infra/helper.py | |
parent | f14497dba0b32ff8a7f0514ec6dae961458f9aa5 (diff) | |
download | oss-fuzz-aecdd9c4e00afbcef14b6b81e52eaac971042094.tar.gz |
Fix helper.py (#4793)
Recently some python3-only code was added. Make code compatible with
Python2. Fixes https://github.com/google/oss-fuzz/issues/4792
Diffstat (limited to 'infra/helper.py')
-rwxr-xr-x | infra/helper.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/infra/helper.py b/infra/helper.py index e0dee6f9e..ff4eb3166 100755 --- a/infra/helper.py +++ b/infra/helper.py @@ -280,7 +280,8 @@ def _get_corpus_dir(project_name=''): """Creates and returns path to /corpus directory for the given project (if specified).""" directory = os.path.join(BUILD_DIR, 'corpus', project_name) - os.makedirs(directory, exist_ok=True) + if not os.path.exists(directory): + os.makedirs(directory) return directory @@ -289,7 +290,8 @@ def _get_output_dir(project_name=''): """Creates and returns path to /out directory for the given project (if specified).""" directory = os.path.join(BUILD_DIR, 'out', project_name) - os.makedirs(directory, exist_ok=True) + if not os.path.exists(directory): + os.makedirs(directory) return directory @@ -298,7 +300,8 @@ def _get_work_dir(project_name=''): """Creates and returns path to /work directory for the given project (if specified).""" directory = os.path.join(BUILD_DIR, 'work', project_name) - os.makedirs(directory, exist_ok=True) + if not os.path.exists(directory): + os.makedirs(directory) return directory |