Summary: |
Error returns from Cairo library are not correctly signalled in python3-cairo |
Product: |
pycairo
|
Reporter: |
Lawrence D'Oliveiro <from-freedesktop> |
Component: |
general | Assignee: |
Steve Chaplin <d74n5pohf9> |
Status: |
RESOLVED
FIXED
|
QA Contact: |
|
Severity: |
normal
|
|
|
Priority: |
medium
|
|
|
Version: |
unspecified | |
|
Hardware: |
Other | |
|
OS: |
All | |
|
Whiteboard: |
|
i915 platform:
|
|
i915 features:
|
|
Attachments: |
set CairoError to an exception that can be raised
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 113515 [details] set CairoError to an exception that can be raised There is a global variable called “CairoError” in python3-cairo, that is passed to PyErr_SetString to raise exceptions for errors returned from the underlying Cairo library. Unfortunately, this is always NULL, which seems to cause the PyErr_SetString calls to be no-ops. This can manifest itself as errors reported from Python to the effect of “null result without error return”. It turns out an Exception object is created at module initialization time, but never assigned to this variable. This patch fixes the problem.