Open tempfile in mode 'w' to prevent TypeError
For printing compilation errors, a NamedTemporaryFile object is opened in the default mode ('w+b'), and strings are written to it. This is not an issue in Python 2, but in Python 3, strings cannot be implicitly converted to bytes so a TypeError occurs on line 2310 (previously 2309). This commit explicitly opens the NamedTemporaryFile in mode 'w'.
正在显示
请
注册
或者
登录
后发表评论