提交 75f01f8b authored 作者: Ian Goodfellow's avatar Ian Goodfellow

changed hardcoded 17 to errno.EEXIST

上级 4aebdb99
import errno
import os, logging, sys import os, logging, sys
import theano import theano
...@@ -40,7 +41,7 @@ try: ...@@ -40,7 +41,7 @@ try:
# Note: we can't check if it exists before making it, because we are not holding # Note: we can't check if it exists before making it, because we are not holding
# the lock right now, so we could race another process and get error 17 if we lose # the lock right now, so we could race another process and get error 17 if we lose
# the race # the race
assert e.errno == 17 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')): if not os.path.exists(os.path.join(location, '__init__.py')):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论