Permalink
Browse files

Raise module exceptions when --debug is invoked

  • Loading branch information...
dagwieers committed Jun 20, 2006
1 parent ecf4a4a commit a3c1637bb0f42105582f0fea958eb4f637af6311
Showing with 5 additions and 1 deletion.
  1. +2 −0 ChangeLog
  2. +3 −1 dstat
View
@@ -8,6 +8,8 @@
- Improved debug output somewhat
- Moved documentation to asciidoc at last
- Added individual swap monitoring (-s with -S)
+- Small performance improvements
+- Raise module exceptions when --debug is invoked
* 0.6.2 - Cumbernauld - released 08/03/2006
- Fixed situation where no TERM environment variable was set (William Webber)
View
4 dstat
@@ -368,7 +368,7 @@ class dstat:
if hasattr(self, 'fd') and not self.fd:
raise Exception, 'File %s does not exist' % self.file
if not self.vars:
- raise Exception, 'No variables defined'
+ raise Exception, 'No objects found, no stats available, module disabled'
if self.discover and self.width():
return True
raise Exception, 'Unknown problem, please report'
@@ -1751,6 +1751,8 @@ def main():
except Exception, e:
if mod == mods[-1]:
info(1, 'Module dstat_%s has problems. (%s)' % (mod, e))
+ if op.debug:
+ raise
continue
if not totlist:

0 comments on commit a3c1637

Please sign in to comment.