We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 889951e commit cd6c8c9Copy full SHA for cd6c8c9
src/_png.cpp
@@ -149,6 +149,7 @@ Py::Object _png_module::write_png(const Py::Tuple& args)
149
}
150
else
151
{
152
+ PyErr_Clear();
153
PyObject* write_method = PyObject_GetAttrString(
154
py_file, "write");
155
if (!(write_method && PyCallable_Check(write_method)))
@@ -326,6 +327,7 @@ _png_module::_read_png(const Py::Object& py_fileobj, const bool float_result,
326
327
328
329
330
331
PyObject* read_method = PyObject_GetAttrString(py_file, "read");
332
if (!(read_method && PyCallable_Check(read_method)))
333
0 commit comments