10524 Provide additional information on traceback
authorMichal Pryc <Michal.Pryc@Sun.Com>
Wed, 02 Sep 2009 13:05:55 -0700
changeset 1338 3fdad345dda6
parent 1337 52e101b7cc31
child 1339 05fe40d1605d
10524 Provide additional information on traceback
src/gui/modules/installupdate.py
src/tests/gui_pylintrc
--- a/src/gui/modules/installupdate.py	Thu Sep 03 18:19:39 2009 -0700
+++ b/src/gui/modules/installupdate.py	Wed Sep 02 13:05:55 2009 -0700
@@ -44,6 +44,7 @@
         import libbe as be
 except ImportError:
         nobe = True
+import pkg
 import pkg.gui.progress as progress
 import pkg.misc
 import pkg.client.history as history
@@ -661,8 +662,8 @@
                 gobject.idle_add(self.current_stage_icon.set_from_stock,
                     gtk.STOCK_DIALOG_ERROR, gtk.ICON_SIZE_MENU)
                 msg_1 = _("An unknown error occurred in the %s stage.\n"
-                    "Please let the developers know about this problem\n"
-                    "by filing a bug together with exception value at:\n"
+                    "Please let the developers know about this problem by\n"
+                    "filing a bug together with the error details listed below at:\n"
                     ) % self.current_stage_name
                 msg_2 = _("http://defect.opensolaris.org\n\n")
                 self.update_details_text(_("\nError:\n"), "bold")
@@ -676,6 +677,36 @@
                 else:
                         msg = _("No futher information available")
                         self.update_details_text("%s\n" % msg, "level2")
+                msg_3 = _("pkg version: ")
+                self.update_details_text("%s" % msg_3,
+                    "bold","level1")
+                self.update_details_text("%s\n\n" % pkg.VERSION, "level2")
+                publisher_header = _("List of configured publishers:")
+                self.update_details_text("%s" % publisher_header,
+                    "bold","level1")
+                pref_pub = self.api_o.get_preferred_publisher()
+                fmt = "\n%s\t%s\t%s (%s)"
+                publisher_str = ""
+                for pub in self.api_o.get_publishers():
+                        pstatus = " "
+                        if pub == pref_pub:
+                                # Preferred
+                                pstatus = "P"
+                        elif pub.disabled:
+                                # Disabled
+                                pstatus = "D"
+                        else:
+                                # Enabled, but not preferred
+                                pstatus = "E"
+                        r = pub.selected_repository
+                        for uri in r.origins:
+                                # Origin
+                                publisher_str += fmt % (pstatus, "O", pub.prefix, uri)
+                        for uri in r.mirrors:
+                                # Mirror
+                                publisher_str += fmt % (pstatus, "M", pub.prefix, uri)
+                self.update_details_text("%s\n" % publisher_str,
+                    "level2")
                 gobject.idle_add(self.w_expander.set_expanded, True)
                 gobject.idle_add(self.w_cancel_button.set_sensitive, True)
 
--- a/src/tests/gui_pylintrc	Thu Sep 03 18:19:39 2009 -0700
+++ b/src/tests/gui_pylintrc	Wed Sep 02 13:05:55 2009 -0700
@@ -146,8 +146,8 @@
 min-public-methods=0
 
 # Maximum number of public methods for a class (see R0904).
-# Increase from 20 to 56 as we are deriving off various classes and can't reduce the number further
-max-public-methods=56
+# Increase from 56 to 60 as we are deriving off various classes and can't reduce the number further
+max-public-methods=60
 
 [IMPORTS]