Re: [PATCH] Log zFCP errors in addition to displaying dialog box

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 16 Aug 2009, Steffen Maier wrote:

Makes zFCP problem determination based on /tmp/anaconda.log easier.
---
iw/autopart_type.py |    3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/iw/autopart_type.py b/iw/autopart_type.py
index 2695b94..6f83490 100644
--- a/iw/autopart_type.py
+++ b/iw/autopart_type.py
@@ -422,6 +422,9 @@ class PartitionTypeWindow(InstallWindow):
            try:
                self.storage.zfcp.addFCP(devnum, wwpn, fcplun)
            except ValueError, e:
+                import logging
+                log = logging.getLogger("anaconda")
+                log.warn(str(e))
                self.intf.messageWindow(_("Error"), str(e))
                continue
            break


In order to maintain consistency with other code and make the logger available
for the rest of the file if we want it, do the import at the top.  Then just
have the log.warn() in the except block.  See iw/upgrade_bootloader_gui.py for
examples.

- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkqLLFEACgkQ5hsjjIy1VknlqACgkNRxCdfdu/iionlnwOrs1oDP
QvAAoIthS6UQ/nqISzhXIwFfx1en3GEN
=6RMJ
-----END PGP SIGNATURE-----

_______________________________________________
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