1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-04 08:02:34 +03:00

Fix python bindings with versions older than 2.7

Need fixing on the Capsule usage, the lack of PyBytes,
lack of io module and the way to access exception details.
This commit is contained in:
Daniel Veillard
2013-04-02 10:27:57 +08:00
parent 4d7a32959b
commit bf4a8f0ea8
8 changed files with 39 additions and 11 deletions

View File

@ -77,7 +77,9 @@ class ioWrapper:
ret = self.__io.read()
else:
ret = self.__io.read(len)
except Exception as e:
except Exception:
import sys
e = sys.exc_info()[1]
print("failed to read from Python:", type(e))
print("on IO:", self.__io)
self.__io == None