[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] Raise an exception if X*Display functions fail (#663294).



Ack.

On Wed, 2010-12-15 at 10:21 -0500, Chris Lumens wrote:
> ---
>  pyanaconda/isys/isys.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/pyanaconda/isys/isys.c b/pyanaconda/isys/isys.c
> index 392a42c..e28fcad 100644
> --- a/pyanaconda/isys/isys.c
> +++ b/pyanaconda/isys/isys.c
> @@ -603,6 +603,7 @@ static PyObject * doIsCapsLockEnabled(PyObject * s, PyObject * args) {
>      XkbStateRec state;
>  
>      if ((d = XOpenDisplay(NULL)) == NULL) {
> +        PyErr_SetString(PyExc_RuntimeError, "XOpenDisplay failed");
>          return NULL;
>      }
>  
> @@ -610,6 +611,7 @@ static PyObject * doIsCapsLockEnabled(PyObject * s, PyObject * args) {
>      XkbGetState(d, XkbUseCoreKbd, &state);
>  
>      if (XCloseDisplay(d)) {
> +        PyErr_SetString(PyExc_RuntimeError, "XCloseDisplay failed");
>          return NULL;
>      }
>  



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]