This commit is contained in:
Kovid Goyal 2007-06-13 19:18:44 +00:00
parent 0145dc3c10
commit 54be02b861
2 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@
## with this program; if not, write to the Free Software Foundation, Inc., ## with this program; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
''' E-book management software''' ''' E-book management software'''
__version__ = "0.3.50" __version__ = "0.3.51"
__docformat__ = "epytext" __docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>" __author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
__appname__ = 'libprs500' __appname__ = 'libprs500'

View File

@ -169,7 +169,7 @@ class xml_field(object):
elem.normalize() elem.normalize()
if elem.hasChildNodes(): if elem.hasChildNodes():
return elem.firstChild.data.strip() return elem.firstChild.data.strip()
return "" return ''
def __set__(self, obj, val): def __set__(self, obj, val):
if val == None: if val == None:
@ -381,10 +381,10 @@ class LRFMetaFile(object):
if candidate[-1:] == '\0': if candidate[-1:] == '\0':
candidate = candidate[:-1] candidate = candidate[:-1]
candidate = dom.parseString(candidate.encode('utf-8')).\ candidate = dom.parseString(candidate.encode('utf-8')).\
toxml(encoding='utf-16') toxml(encoding='utf-16').strip()
else: else:
candidate = candidate.encode('utf-16') candidate = candidate.strip().encode('utf-16')
return candidate.strip() return candidate
except zlib.error: except zlib.error:
raise LRFException("Unable to decompress document meta information") raise LRFException("Unable to decompress document meta information")