提交 4a2402bb authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Merge pull request #2721 from aalmah/lazylinker_c_problem

Lazylinker c problem
......@@ -51,8 +51,16 @@ try:
assert e.errno == errno.EEXIST
assert os.path.isdir(location)
if not os.path.exists(os.path.join(location, '__init__.py')):
open(os.path.join(location, '__init__.py'), 'w').close()
init_file = os.path.join(location, '__init__.py')
if not os.path.exists(init_file):
try:
open(init_file, 'w').close()
except IOError as e:
if os.path.exists(init_file):
pass # has already been created
else:
e.args += ('%s exist?' % os.path.exists(location),)
raise
_need_reload = False
if force_compile:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论