mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #76
This commit is contained in:
parent
0145dc3c10
commit
54be02b861
@ -13,7 +13,7 @@
|
||||
## with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
''' E-book management software'''
|
||||
__version__ = "0.3.50"
|
||||
__version__ = "0.3.51"
|
||||
__docformat__ = "epytext"
|
||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||
__appname__ = 'libprs500'
|
||||
|
@ -169,7 +169,7 @@ class xml_field(object):
|
||||
elem.normalize()
|
||||
if elem.hasChildNodes():
|
||||
return elem.firstChild.data.strip()
|
||||
return ""
|
||||
return ''
|
||||
|
||||
def __set__(self, obj, val):
|
||||
if val == None:
|
||||
@ -381,10 +381,10 @@ class LRFMetaFile(object):
|
||||
if candidate[-1:] == '\0':
|
||||
candidate = candidate[:-1]
|
||||
candidate = dom.parseString(candidate.encode('utf-8')).\
|
||||
toxml(encoding='utf-16')
|
||||
toxml(encoding='utf-16').strip()
|
||||
else:
|
||||
candidate = candidate.encode('utf-16')
|
||||
return candidate.strip()
|
||||
candidate = candidate.strip().encode('utf-16')
|
||||
return candidate
|
||||
except zlib.error:
|
||||
raise LRFException("Unable to decompress document meta information")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user