FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 03-12-2010, 02:42 PM
Chris Lumens
 
Default Fix displaying error messages on cleanup/remove callback problems (#572893).

The following patch should likely be applied to all branches as well, since
it's good to not traceback when displaying error messages.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-12-2010, 02:42 PM
Chris Lumens
 
Default Fix displaying error messages on cleanup/remove callback problems (#572893).

---
yuminstall.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index d9c621d..3bd01e5 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -238,6 +238,12 @@ class AnacondaCallback:

(hdr, rpmloc) = h

+ # If this is a cleanup/remove, then hdr is a string not a header.
+ if isinstance(hdr, rpm.hdr):
+ name = hdr['name']
+ else:
+ name = hdr
+
# Script errors store whether or not they're fatal in "total". So,
# we should only error out for fatal script errors or the cpio and
# unpack problems.
@@ -246,7 +252,7 @@ class AnacondaCallback:
_("A fatal error occurred when installing the %s "
"package. This could indicate errors when reading "
"the installation media. Installation cannot "
- "continue.") % hdr['name'],
+ "continue.") % name,
type="custom", custom_icon="error",
custom_buttons=[_("_Exit installer")])
sys.exit(1)
--
1.6.5.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-12-2010, 02:56 PM
Hans de Goede
 
Default Fix displaying error messages on cleanup/remove callback problems (#572893).

Ack.

On 03/12/2010 04:42 PM, Chris Lumens wrote:

---
yuminstall.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index d9c621d..3bd01e5 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -238,6 +238,12 @@ class AnacondaCallback:

(hdr, rpmloc) = h

+ # If this is a cleanup/remove, then hdr is a string not a header.
+ if isinstance(hdr, rpm.hdr):
+ name = hdr['name']
+ else:
+ name = hdr
+
# Script errors store whether or not they're fatal in "total". So,
# we should only error out for fatal script errors or the cpio and
# unpack problems.
@@ -246,7 +252,7 @@ class AnacondaCallback:
_("A fatal error occurred when installing the %s "
"package. This could indicate errors when reading "
"the installation media. Installation cannot "
- "continue.") % hdr['name'],
+ "continue.") % name,
type="custom", custom_icon="error",
custom_buttons=[_("_Exit installer")])
sys.exit(1)


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org