[PATCH 1/2] Add lsblk output to data gathered after crash (#879940)

Martin Sivak msivak at redhat.com
Fri Jan 25 12:57:56 UTC 2013


Ack.

----- Original Message -----
> python-meh now allows us to register callbacks providing some
> additional
> info.
> 
> Signed-off-by: Vratislav Podzimek <vpodzime at 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 at redhat.com>
>  #            David Cantrell <dcantrell at redhat.com>
> +#            Vratislav Podzimek <vpodzime at 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 at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 


More information about the anaconda-patches mailing list