tools: adding error and warning calls
[treecutter.git] / treecutter / docbook.py
index a143487f7c071a2d8ed23805f56797bcac88beaa..e7b6e9f6d833099ca504276a24970c3cb4d94447 100644 (file)
@@ -11,6 +11,7 @@ from time import time
 
 import treecutter.constants as const
 from treecutter.image import Image
+from treecutter.tools import warning
 
 class Docbook():
     """Class representing a docbook document"""
@@ -82,7 +83,8 @@ class Docbook():
                 (stdout, stderr) = xml.communicate()
                 #print xml.returnvalue
                 if stderr:
-                    print " ".join(exe)+" ERROR : [ "+stderr+" ]"
+                    warning("%s : %s" % (" ".join(exe),stderr))
+                    warning(stdout)
                     exit
                 os.chdir(cwd)
                 te = time()