Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

The app is failing for a lot of people right now. #9

Open
wants to merge 1 commit into from

1 participant

@ddustin

To get it to run, I made it fail more gracefully. It does miss a few of the more complicated classes, but at least it runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 26, 2012
  1. @ddustin
This page is out of date. Refresh to see the latest.
Showing with 22 additions and 4 deletions.
  1. +22 −4 doxyclean.py
View
26 doxyclean.py
@@ -59,7 +59,12 @@ def fileIsDocumented(filePath):
return False
# Check if the object is documented
- originaldoc = minidom.parse(filePath)
+
+ try:
+ originaldoc = minidom.parse(filePath)
+ except Exception:
+ return False
+
briefList = originaldoc.getElementsByTagName('briefdescription')
detailList = originaldoc.getElementsByTagName('detaileddescription')
@@ -80,14 +85,21 @@ def nameForFile(filePath):
return None
xmlDoc = minidom.parse(filePath)
- return xmlDoc.getElementsByTagName("name")[0].firstChild.data
+
+ try:
+ return xmlDoc.getElementsByTagName("name")[0].firstChild.data
+ except Exception:
+ return "<NoName/>"
def typeForFile(filePath):
if not os.path.splitext(filePath)[1] == ".xml":
return None
xmlDoc = minidom.parse(filePath)
- return xmlDoc.getElementsByTagName("object")[0].attributes["kind"].value
+ try:
+ return xmlDoc.getElementsByTagName("object")[0].attributes["kind"].value
+ except Exception:
+ return "<NoType/>"
def cleanXML(filePath, outputDirectory):
if not fileIsDocumented(filePath):
@@ -1050,6 +1062,8 @@ def linkify(directory, shouldEstablishIPhoneLinks):
target = "../Categories/{name}"
elif objectType == "protocol":
target = "../Protocols/{name}"
+ else:
+ continue
documentedTargets[objectName] = target
@@ -1071,6 +1085,10 @@ def linkify(directory, shouldEstablishIPhoneLinks):
continue
refName = refNode.childNodes[0].nodeValue
+
+ if documentedTargets.has_key(refName) == False:
+ continue
+
formatString = documentedTargets[refName]
refTarget = formatString.format(name=refName)
refNode.setAttribute("id", refTarget)
@@ -1217,4 +1235,4 @@ def main(argv=None):
return 0
if __name__ == '__main__':
- sys.exit(main())
+ sys.exit(main())
Something went wrong with that request. Please try again.