Commit 92efe453 authored by Matthew Conway's avatar Matthew Conway

update gen_javadoc prints to python3 syntax fixed #3768

parent b8457be3
...@@ -65,13 +65,13 @@ class JavadocGenerator(object): ...@@ -65,13 +65,13 @@ class JavadocGenerator(object):
javadoc = self.makeJavadoc(decl, marker[2]) javadoc = self.makeJavadoc(decl, marker[2])
if self.verbose: if self.verbose:
print print
print "Javadoc for \"%s\" File: %s (line %s)" % (decl["name"], decl["file"], decl["line"]) print("Javadoc for \"%s\" File: %s line %s" % (decl["name"], decl["file"], decl["line"]))
print javadoc print(javadoc)
for line in javadoc.split("\n"): for line in javadoc.split("\n"):
outf.write(marker[1] + line + "\n") outf.write(marker[1] + line + "\n")
self.markers_documented += 1 self.markers_documented += 1
elif self.show_errors: elif self.show_errors:
print >> sys.stderr, "gen_javadoc error: could not find documentation for %s (module: %s)" % (l.lstrip()[len(self.javadoc_marker):-1].strip(), module) sys.stderr.write("gen_javadoc error: could not find documentation for %s (module: %s)" % (l.lstrip()[len(self.javadoc_marker):-1].strip(), module))
else: else:
outf.write(org.replace("\t", " ").rstrip()+"\n") outf.write(org.replace("\t", " ").rstrip()+"\n")
except: except:
...@@ -210,7 +210,7 @@ class JavadocGenerator(object): ...@@ -210,7 +210,7 @@ class JavadocGenerator(object):
if not arg_doc: if not arg_doc:
arg_doc = "a " + arg arg_doc = "a " + arg
if self.show_warnings: if self.show_warnings:
print >> sys.stderr, "gen_javadoc warning: parameter \"%s\" of \"%s\" is undocumented. File: %s (line %s)" % (arg, decl["name"], decl["file"], decl["line"]) sys.stderr.write("gen_javadoc warning: parameter \"%s\" of \"%s\" is undocumented. File: %s (line %s)" % (arg, decl["name"], decl["file"], decl["line"]))
self.params_undocumented += 1 self.params_undocumented += 1
else: else:
self.params_documented += 1 self.params_documented += 1
...@@ -237,14 +237,14 @@ class JavadocGenerator(object): ...@@ -237,14 +237,14 @@ class JavadocGenerator(object):
return (doc + " */").replace("::",".") return (doc + " */").replace("::",".")
def printSummary(self): def printSummary(self):
print "Javadoc Generator Summary:" print("Javadoc Generator Summary:")
print " Total markers: %s" % self.markers_processed print(" Total markers: %s" % self.markers_processed)
print " Undocumented markers: %s" % (self.markers_processed - self.markers_documented) print( " Undocumented markers: %s" % (self.markers_processed - self.markers_documented))
print " Generated comments: %s" % self.markers_documented print( " Generated comments: %s" % self.markers_documented)
print print
print " Documented params: %s" % self.params_documented print(" Documented params: %s" % self.params_documented)
print " Undocumented params: %s" % self.params_undocumented print(" Undocumented params: %s" % self.params_undocumented)
print print
if __name__ == "__main__": if __name__ == "__main__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment