提交 3d91e393 authored 作者: Amjad Almahairi's avatar Amjad Almahairi

added fix

上级 e85ae3bd
...@@ -51,8 +51,17 @@ try: ...@@ -51,8 +51,17 @@ try:
assert e.errno == errno.EEXIST assert e.errno == errno.EEXIST
assert os.path.isdir(location) assert os.path.isdir(location)
if not os.path.exists(os.path.join(location, '__init__.py')): init_file = os.path.join(location, '__init__.py')
open(os.path.join(location, '__init__.py'), 'w').close() 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:
if os.path.exists(location):
e.args += ('%s does not exist..' % location,)
raise
_need_reload = False _need_reload = False
if force_compile: if force_compile:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论