Permalink
Browse files

fixed parsing in over-zealous cleaning method

  • Loading branch information...
1 parent 0286c33 commit a9e1db55dd8204a30d368d3850c58146f67904be Kyle L. Huff committed with taxilian Oct 17, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 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,16 +95,16 @@ 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
while n < 10:
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:

0 comments on commit a9e1db5

Please sign in to comment.