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

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

 



---
 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;
     }
 
-- 
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux