Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed parsing in over-zealous cleaning method

  • Loading branch information...
commit a9e1db55dd8204a30d368d3850c58146f67904be 1 parent 0286c33
@kylehuff kylehuff authored taxilian committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 doxygen/doc2confluence.py
View
8 doxygen/doc2confluence.py
@@ -69,7 +69,7 @@ def getName(self, name):
def makeFirstPageInConfluence(self, pageId, targetPageId):
children = self.rpc.getChildren(self.token, SOAPpy.Types.longType(long(pageId)))
- if children and children[0]["id"] != targetPageId:
+ if len(children) and children[0]["id"] != targetPageId:
print "Moving %s to before %s" % (targetPageId, children[0]["id"])
self.rpc.movePage(self.token, SOAPpy.Types.longType(long(targetPageId)), SOAPpy.Types.longType(long(children[0]["id"])), "above")
@@ -95,8 +95,8 @@ def exportToConfluence(self, refId, pageName, kind):
}
if hasattr(page, 'id'):
- npage["id"] = SOAPpy.Types.intType(int(page["id"]))
- npage["parentId"] = SOAPpy.Types.intType(int(self.parents[refId]))
+ npage["id"] = SOAPpy.Types.longType(long(page["id"]))
+ npage["parentId"] = SOAPpy.Types.longType(long(self.parents[refId]))
npage["version"] = SOAPpy.Types.intType(int(page["version"]))
n = 0
@@ -104,7 +104,7 @@ def exportToConfluence(self, refId, pageName, kind):
try:
npage["content"] = self.rpc.convertWikiToStorageFormat(self.token, npage['content'])
npage = self.rpc.storePage(self.token, npage)
- self.createdPages.append(SOAPpy.Types.longType(long(npage["id"])))
+ self.createdPages.append(npage["id"])
self.rpc.setContentPermissions(self.token, SOAPpy.Types.longType(long(npage["id"])), "Edit", [ {'groupName': 'confluence-administrators', 'type': 'Edit'} ])
break;
except Exception as ex:
Please sign in to comment.
Something went wrong with that request. Please try again.