Commit 3cc2b8d1 authored by Nicolas Dumazet's avatar Nicolas Dumazet

Do not crash when target location exists

After a failed attempt, if the user removes the __compile directory
but leaves the target directory untouched, and re-runs the buildout,
an OSError should not be raised.
parent 4cc050ae
...@@ -120,7 +120,11 @@ class Recipe(object): ...@@ -120,7 +120,11 @@ class Recipe(object):
compile_dir = self.options['path'] compile_dir = self.options['path']
current_dir = os.getcwd() current_dir = os.getcwd()
try:
os.mkdir(self.options['location']) os.mkdir(self.options['location'])
except OSError, e:
if e.errno == errno.EEXIST:
pass
os.chdir(compile_dir) os.chdir(compile_dir)
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment