提交 4aebdb99 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

use errno field to check error number, instead of parsing string

上级 1db1fa6b
......@@ -40,7 +40,7 @@ try:
# 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 race
assert 'Errno 17' in str(e)
assert e.errno == 17
assert os.path.isdir(location)
if not os.path.exists(os.path.join(location, '__init__.py')):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论