Fix error handling in xsltproc.py
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Wed, 21 Nov 2007 07:05:17 +0000 (02:05 -0500)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Wed, 21 Nov 2007 07:05:17 +0000 (02:05 -0500)
scripts/xsltproc.py

index 30d3a52..1fec667 100755 (executable)
@@ -106,10 +106,10 @@ try:
 
     # parse xml/xslt and apply style-sheet
     style = libxslt.parseStylesheetFile(xsltFile)
+    if style == None: sys.exit(1)
     doc = libxml2.parseFile(inFile)
     res = style.applyStylesheet(doc, params)
     ret = style.saveResultToFilename(outFile, res, 0)
 
 except Exception, e:
-    print e
     sys.exit(1)