It seems that self.numWords and self.numChapters can on occasion be numeric instead of string, so use the str() function when building the string for the title page.

This commit is contained in:
wsuetholz 2010-11-10 12:34:25 -06:00
parent d4c18fe1a8
commit 7c252e83a1

View file

@ -258,7 +258,7 @@ class EPubFanficWriter(FanficWriter):
self._writeFile(titleFilePath, TITLE_ENTRY % ('Packaged:', createda))
tmpstr = self.adapter.getStoryRating() + " / " + self.adapter.getStoryUserRating()
self._writeFile(titleFilePath, TITLE_ENTRY % ('Rating Age/User:', tmpstr))
tmpstr = self.adapter.getNumChapters() + " / " + self.adapter.getNumWords()
tmpstr = str(self.adapter.getNumChapters()) + " / " + str(self.adapter.getNumWords())
self._writeFile(titleFilePath, TITLE_ENTRY % ('Chapters/Words:', tmpstr))
self._writeFile(titleFilePath, TITLE_ENTRY % ('Publisher:', self.adapter.getHost()))
self._writeFile(titleFilePath, TITLE_ENTRY % ('Story ID:', self.adapter.getStoryId()))