From: Coly Li Subject: ocfs2console: Whoops, don't reset all warnings, just pop the DISPLAY one References: bnc#448523 Author: Hu Ziming comment from patch by Joel: We turn warnings into error while calling 'import gtk' to handle a pygtk bug with an invalid DISPLAY. After we return from 'import gtk', we were calling warnings.resetwarnings() to get back to the normal state. However, it looks like that clears more warning filters than the one we added. Let's fix this. comment from bugzilla by Joel: Ziming Hu's patch for fixing the warning filters is now upstream. I regret to say that since I hand-coded it from memory, I forgot to credit him with the discovery before committing. That credit will live here. Signed-off-by: Hu Ziming Signed-off-by: Joel Becker Signed-off-by: Coly Li --- diff -ru ocfs2-tools/ocfs2console/ocfs2console ocfs2-tools-new/ocfs2console/ocfs2console --- ocfs2-tools/ocfs2console/ocfs2console 2009-02-17 06:06:57.910766000 +0100 +++ ocfs2-tools-new/ocfs2console/ocfs2console 2009-02-17 06:09:32.935591000 +0100 @@ -17,8 +17,7 @@ print >>sys.stderr, '''ERROR: ocfs2console needs an X11 display. Make sure a proper setup for your display environment exists.\n''' sys.exit(1) - -warnings.resetwarnings() +warnings.filters.pop(0) if nodeconf: from ocfs2interface.nodeconfig import node_config