summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/doxygen/swig_doc.py28
1 files changed, 22 insertions, 6 deletions
diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py
index 0148ba8fb..4148a546b 100644
--- a/docs/doxygen/swig_doc.py
+++ b/docs/doxygen/swig_doc.py
@@ -214,12 +214,28 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None):
make_funcs = set([])
for block in blocks:
- try:
- make_func = di.get_member(make_name(block.name()), DoxyFunction)
- make_funcs.add(make_func.name())
- output.append(make_block_entry(di, block))
- except block.ParsingError:
- sys.stderr.write('Parsing error for block {0}'.format(block.name()))
+ tries = 0
+ while(1):
+ try:
+ make_func = di.get_member(make_name(block.name()), DoxyFunction)
+ make_funcs.add(make_func.name())
+ output.append(make_block_entry(di, block))
+ except block.ParsingError:
+ sys.stderr.write('Parsing error for block {0}'.format(block.name()))
+ except:
+ if(tries < 3):
+ # May not be built just yet; sleep and try again
+ sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format(
+ swigdocfilename))
+ time.sleep(1)
+ tries += 1
+ else:
+ # if we've given it three tries, give up and raise an error
+ sys.stderr.write("XML parsing error with file {0}. giving up.\n".format(
+ swigdocfilename))
+ raise
+ else:
+ break
# Create docstrings for functions
# Don't include the make functions since they have already been dealt with.