[node-patches] Change in ovirt-node[master]: app: Add debug mode

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Jun 20 17:59:31 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: app: Add debug mode
......................................................................

app: Add debug mode

Change-Id: Ib0bf1b3d6bb360b3dfda9bb7c604153e0f13bebc
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/app.py
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/65/15965/1

diff --git a/src/ovirt/node/app.py b/src/ovirt/node/app.py
index 482565e..eedfef2 100644
--- a/src/ovirt/node/app.py
+++ b/src/ovirt/node/app.py
@@ -106,6 +106,11 @@
                           dest="dry",
                           default=False,
                           help="Just write defaults, nothing else")
+        parser.add_option("--debug",
+                          action='store_true',
+                          dest="debug",
+                          default=False,
+                          help="Run in debug mode (suitable for pdb)")
         (self.args, argcount) = parser.parse_args()
 
         self.logger.debug("Parsed args: %s" % self.args)
@@ -292,6 +297,8 @@
         try:
             self.ui.run()
         except Exception as e:
+            if self.args.debug:
+                raise
             utils.process.call("reset")
             self.logger.error("An error appeared in the UI: %s" % repr(e))
             self.logger.debug("Exception:", exc_info=True)


-- 
To view, visit http://gerrit.ovirt.org/15965
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0bf1b3d6bb360b3dfda9bb7c604153e0f13bebc
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list