##// END OF EJS Templates
fix more exeptions...
Matthias BUSSONNIER -
Show More
@@ -413,7 +413,7 b' class FunctionDoc(NumpyDocString):'
413 doc = inspect.getdoc(func) or ''
413 doc = inspect.getdoc(func) or ''
414 try:
414 try:
415 NumpyDocString.__init__(self, doc)
415 NumpyDocString.__init__(self, doc)
416 except ValueError, e:
416 except ValueError as e:
417 print '*'*78
417 print '*'*78
418 print "ERROR: '%s' while parsing `%s`" % (e, self._f)
418 print "ERROR: '%s' while parsing `%s`" % (e, self._f)
419 print '*'*78
419 print '*'*78
@@ -429,7 +429,7 b' class FunctionDoc(NumpyDocString):'
429 argspec = inspect.formatargspec(*argspec)
429 argspec = inspect.formatargspec(*argspec)
430 argspec = argspec.replace('*','\*')
430 argspec = argspec.replace('*','\*')
431 signature = '%s%s' % (func_name, argspec)
431 signature = '%s%s' % (func_name, argspec)
432 except TypeError, e:
432 except TypeError as e:
433 signature = '%s()' % func_name
433 signature = '%s()' % func_name
434 self['Signature'] = signature
434 self['Signature'] = signature
435
435
@@ -36,7 +36,7 b' def make_link_node(rawtext, app, type, slug, options):'
36 raise AttributeError
36 raise AttributeError
37 if not base.endswith('/'):
37 if not base.endswith('/'):
38 base += '/'
38 base += '/'
39 except AttributeError, err:
39 except AttributeError as err:
40 raise ValueError('github_project_url configuration value is not set (%s)' % str(err))
40 raise ValueError('github_project_url configuration value is not set (%s)' % str(err))
41
41
42 ref = base + type + '/' + slug + '/'
42 ref = base + type + '/' + slug + '/'
@@ -133,7 +133,7 b' def ghcommit_role(name, rawtext, text, lineno, inliner, options={}, content=[]):'
133 raise AttributeError
133 raise AttributeError
134 if not base.endswith('/'):
134 if not base.endswith('/'):
135 base += '/'
135 base += '/'
136 except AttributeError, err:
136 except AttributeError as err:
137 raise ValueError('github_project_url configuration value is not set (%s)' % str(err))
137 raise ValueError('github_project_url configuration value is not set (%s)' % str(err))
138
138
139 ref = base + text
139 ref = base + text
@@ -380,7 +380,7 b' def visit_inheritance_diagram(inner_func):'
380 def visitor(self, node):
380 def visitor(self, node):
381 try:
381 try:
382 content = inner_func(self, node)
382 content = inner_func(self, node)
383 except DotException, e:
383 except DotException as e:
384 # Insert the exception as a warning in the document
384 # Insert the exception as a warning in the document
385 warning = self.document.reporter.warning(str(e), line=node.line)
385 warning = self.document.reporter.warning(str(e), line=node.line)
386 warning.parent = node
386 warning.parent = node
General Comments 0
You need to be logged in to leave comments. Login now