dabodoc Commit
Revision 71
Date: 2011-03-30 01:51:36 -0700 (Wed, 30 Mar 2011)
Author: Werner
Trac: http://trac.dabodev.com/changeset/71

Changed:
U   trunk/api/sphinx/makeSphinx.py

Log:
- if there were errors show a message on the console/terminal in addition to 
logging the details in a file

Diff:
Modified: trunk/api/sphinx/makeSphinx.py
===================================================================
--- trunk/api/sphinx/makeSphinx.py      2011-03-30 08:50:11 UTC (rev 70)
+++ trunk/api/sphinx/makeSphinx.py      2011-03-30 08:51:36 UTC (rev 71)
@@ -50,7 +50,6 @@
                p = subprocess.Popen(command, stdin=subprocess.PIPE, 
stdout=None, 
                        stderr=sc.sphinxStdErrFile, 
startupinfo=startupinfo).communicate()
 
-
 start = time.time()
 
 args = sys.argv[1:]
@@ -79,4 +78,12 @@
 current = time.time()
 h, m, s = FractSec(int(current - start))
 
-print "\nDabo Documentation Sphinx build '%s' is finished. Elapsed time 
%02d:%02d:%02d" % (builder, h, m, s)
+sc.sphinxStdErrFile.close()
+
+# check for errors
+errF = open(sc.sStdErr, 'r')
+anyErr = errF.read()
+if anyErr:
+    print "\nThere were errors during the documentation generation, check: %s" 
% sc.sStdErr
+else:
+    print "\nDabo Documentation Sphinx build '%s' is finished. Elapsed time 
%02d:%02d:%02d" % (builder, h, m, s)



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to