diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-01-03 17:15:23 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-01-03 17:15:23 -0500 |
commit | 0f3bb8be9d3eb2549de15c7192fcbeb57baf588d (patch) | |
tree | ee0d6f8b094d0d680dac9a3b2442d1ad8748aedc /docs/doxygen | |
parent | e3068517815363102043363556be654c5b47c5c9 (diff) |
build: have swig_doc catch the exception when the xml parsing fails on a not-complete file.
The method sleeps for a second and tries again 3 times before fully failing. This seems a bit crass...
Diffstat (limited to 'docs/doxygen')
-rw-r--r-- | docs/doxygen/swig_doc.py | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py index 5034099e3d..7b34a523e6 100644 --- a/docs/doxygen/swig_doc.py +++ b/docs/doxygen/swig_doc.py @@ -27,7 +27,7 @@ python docstrings. """ -import sys +import sys, time try: from doxyxml import DoxyIndex, DoxyClass, DoxyFriend, DoxyFunction, DoxyFile, base @@ -193,7 +193,25 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): output.append(custom_output) # Create docstrings for the blocks. - blocks = di.in_category(Block) + tries = 0 + while(1): + try: + blocks = di.in_category(Block) + 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 + make_funcs = set([]) for block in blocks: try: |