[omd-commits] OMD Git: omd: omd: Catching exceptions in single files during update and continuing with the other files

git version control git at mathias-kettner.de
Fri Dec 16 15:35:54 CET 2011


Module:   omd
Branch:   master
Commit:   f2a9c6b2c5bced74f3ebbdcf18e97ac6a5c3b7c6
URL:      http://omdistro.org/projects/omd/repository/revisions/f2a9c6b2c5bced74f3ebbdcf18e97ac6a5c3b7c6

Author:   Lars Michelsen <lm at mathias-kettner.de>
Date:     Fri Dec 16 15:35:45 2011 +0100
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date:     Fri Dec 16 15:35:45 2011 +0100

omd: Catching exceptions in single files during update and continuing with the other files

---

 packages/omd/omd |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/packages/omd/omd b/packages/omd/omd
index f46e8a9..ffe7f67 100644
--- a/packages/omd/omd
+++ b/packages/omd/omd
@@ -24,7 +24,7 @@
 # to the Free Software Foundation, Inc., 51 Franklin St,  Fifth Floor,
 # Boston, MA 02110-1301 USA.
 
-import sys, os, shutil, pwd, grp, re, time, pprint, tty, termios
+import sys, os, shutil, pwd, grp, re, time, pprint, tty, termios, traceback
 from subprocess import *
 
 OMD_VERSION = "0.51"
@@ -2530,8 +2530,12 @@ def walk_skel(root, handler, args, exclude_if_in = None, relbase = '.'):
             try:
                 handler(path, *args)
             except Exception, e:
-                sys.stderr.write("Error updating %s/%s: %s\n" % (g_sitedir, path, e))
-                raise
+                sys.stderr.write(error * 40 + "\n")
+                sys.stderr.write(error + " Exception      %s\n" % (path))
+                sys.stderr.write(error + " " + traceback.format_exc().replace('\n', "\n" + error + " ") + "\n")
+                sys.stderr.write(error * 40 + "\n")
+                #sys.stderr.write("Error updating %s/%s: %s\n" % (g_sitedir, path, e))
+                #raise
 
 
 def main_update(args, options={}):



More information about the omd-commits mailing list