Franck Pommereau

handle parse errors in apidoc, one fixed

...@@ -270,7 +270,11 @@ class DocExtract (object) : ...@@ -270,7 +270,11 @@ class DocExtract (object) :
270 path = os.path.join(dirpath, name) 270 path = os.path.join(dirpath, name)
271 if not self.openout(path) : 271 if not self.openout(path) :
272 continue 272 continue
273 - node = parse(open(path).read()) 273 + try :
274 + node = parse(open(path).read())
275 + except :
276 + err("error parsing %r" % path)
277 + continue
274 if ".plugins." in self.module : 278 if ".plugins." in self.module :
275 self.visit_plugin(node) 279 self.visit_plugin(node)
276 else : 280 else :
......
...@@ -203,4 +203,4 @@ if __name__ == '__main__': ...@@ -203,4 +203,4 @@ if __name__ == '__main__':
203 httpd = HTTPServer(('', 1234), HelloNode(r=DirNode("."))) 203 httpd = HTTPServer(('', 1234), HelloNode(r=DirNode(".")))
204 httpd.serve_forever() 204 httpd.serve_forever()
205 except KeyboardInterrupt : 205 except KeyboardInterrupt :
206 - print "\rGoobye" 206 + print("\rGoobye")
......