[svn] r5604 - trunk/tools/dstat

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Wed Jul 11 23:23:10 CEST 2007


Author: dag
Date: 2007-07-11 23:23:09 +0200 (Wed, 11 Jul 2007)
New Revision: 5604

Modified:
   trunk/tools/dstat/dstat
Log:
Improve output when modules fail to load.

Modified: trunk/tools/dstat/dstat
===================================================================
--- trunk/tools/dstat/dstat	2007-07-11 21:09:18 UTC (rev 5603)
+++ trunk/tools/dstat/dstat	2007-07-11 21:23:09 UTC (rev 5604)
@@ -1840,7 +1840,11 @@
                     exec 'o = dstat_%s()' % mod
 #                print o.__module__
             except Exception, e:
-                info(1, 'Module %s failed to load. (%s)' % (mod, e))
+                if mod != mods[-1]:
+                    if op.debug:
+                        info(1, 'Module %s failed to load, trying another. (%s)' % (mod, e))
+                else:
+                    info(1, 'Module %s failed to load, giving up. (%s)' % (mod, e))
                 if op.debug:
                     raise
 #                tb = sys.exc_info()[2]




More information about the commits mailing list