mirror of https://github.com/google/oss-fuzz.git
Make error handling around already existing directories more precise (#71)
This commit is contained in:
parent
38f4df7ddc
commit
4a03707c3e
|
@ -17,6 +17,7 @@
|
|||
|
||||
from __future__ import print_function
|
||||
import argparse
|
||||
import errno
|
||||
import os
|
||||
import pipes
|
||||
import re
|
||||
|
@ -236,7 +237,9 @@ def generate(generate_args):
|
|||
|
||||
try:
|
||||
os.mkdir(dir)
|
||||
except OSError:
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
print(dir, 'already exists.', file=sys.stderr)
|
||||
return 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue