pretty printing wsdl using xml.dom.minidom - avoid xml.dom.ext that is outdated
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 16 Jan 2013 10:42:33 +0000 (11:42 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 16 Jan 2013 10:42:33 +0000 (11:42 +0100)
wsdl/sfa2wsdl.py

index 3811d70..a9e3c32 100755 (executable)
@@ -9,7 +9,6 @@ import os, sys
 import time
 import pdb
 import xml.dom.minidom
-#import xml.dom.ext
 import apistub
 import inspect
 
@@ -327,10 +326,9 @@ class WSDLGen:
 
     def pretty_print(self):
         if (self.wsdl):
-            #xml.dom.ext.PrettyPrint(self.wsdl)
-            xml.dom.minidom.Document.toprettyxml(self.wsdl)
+             print xml.dom.minidom.Document.toprettyxml(self.wsdl)
         else:
-            raise Exception("Empty WSDL")
+             raise Exception("Empty WSDL")
 
 def main():
     parser = OptionParser()