python-meh now allows us to register callbacks providing some
additional
info.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/exception.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index 2c852ae..bc320f9 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -1,7 +1,7 @@
#
# exception.py - general exception formatting and saving
#
-# Copyright (C) 2000-2012 Red Hat, Inc.
+# Copyright (C) 2000-2013 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or
modify
@@ -19,6 +19,7 @@
#
# Author(s): Chris Lumens <clumens(a)redhat.com>
# David Cantrell <dcantrell(a)redhat.com>
+# Vratislav Podzimek <vpodzime(a)redhat.com>
#
from meh.handler import *
from meh.dump import *
@@ -175,12 +176,20 @@ def initExceptionHandling(anaconda):
"payload._yum"],
localSkipList=[ "passphrase", "password" ],
fileList=fileList)
+
+ conf.register_callback("lsblk_output", lsblk_callback,
attchmnt_only=True)
+
handler = AnacondaExceptionHandler(conf,
anaconda.intf.meh_interface,
ReverseExceptionDump,
anaconda.intf.tty_num)
handler.install(anaconda)
return conf
+def lsblk_callback():
+ """Callback to get info about block devices."""
+
+ return iutil.execWithCapture("lsblk", ["--perms",
"--fs",
"--bytes"])
+
def test_exception_handling():
"""
Function that can be used for testing exception handling in
anaconda. It
--
1.7.11.7
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches