ocfs2-tools/ocfs2console-display-fix.diff

29 lines
808 B
Diff

From: Coly Li <coly.li@suse.de>
Subject: fix ocfs2console crashing when DISPLAY is not correctly set
References: bnc#448523
Author: Hu Ziming <huzim@cn.ibm.com>
When DISPLAY is not correctly set, this patch makes ocfs2console report error
mesage and exit, other than a ugly crash.
Signed-off-by: Hu Ziming <huzim@cn.ibm.com>
Signed-off-by: Coly Li <coly.li@suse.de>
---
ocfs2console/ocfs2console | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ocfs2console/ocfs2console b/ocfs2console/ocfs2console
index 77ab623..580d54b 100755
--- a/ocfs2console/ocfs2console
+++ b/ocfs2console/ocfs2console
@@ -3,6 +3,9 @@
from ocfs2interface.about import process_args
nodeconf = process_args()
+import warnings
+warnings.simplefilter("error")
+
try:
import gtk
except RuntimeError: