Commits

Jan Borsodi committed c77bcd6

Fixed python error when using xml command.

Comments (0)

Files changed (1)

         generateXML(package, node)
         if out_dir:
             text = getattr(doc, xmlfunc)()
-            fname = os.path.join(out_dir, service.name + ".xml")
+            service_name = package.name
+            if package.services:
+                service_name = package.services[0].name
+            fname = os.path.join(out_dir, service_name + ".xml")
             outfile = open(fname, "w").write(text)
-            print "Wrote service %s to '%s'" % (service.name, fname)
+            print "Wrote service %s to '%s'" % (service_name, fname)
     if not out_dir:
         text = getattr(doc, xmlfunc)()
         f.write(text)