Fix minor bugs.

This commit is contained in:
Kovid Goyal 2007-05-13 20:35:33 +00:00
parent 2b67c7548f
commit 8c3e447dc4
3 changed files with 4 additions and 3 deletions

View File

@ -33,7 +33,7 @@ You may have to adjust the GROUP and the location of the rules file to
suit your distribution. suit your distribution.
""" """
__version__ = "0.3.27" __version__ = "0.3.28"
__docformat__ = "epytext" __docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>" __author__ = "Kovid Goyal <kovid@kovidgoyal.net>"

View File

@ -17,7 +17,7 @@
""" """
Code to convert HTML ebooks into LRF ebooks. Code to convert HTML ebooks into LRF ebooks.
I am indebted to esperanc for the CSS->Xylog Style conversion routines I am indebted to esperanc for the initial CSS->Xylog Style conversion routines
and to Falstaff for pylrs. and to Falstaff for pylrs.
""" """
import os, re, sys, shutil, traceback, copy import os, re, sys, shutil, traceback, copy

View File

@ -103,6 +103,7 @@ class xml_attr_field(object):
elem = candidate elem = candidate
if elem and elem.hasAttribute(self.attr): if elem and elem.hasAttribute(self.attr):
return elem.getAttribute(self.attr) return elem.getAttribute(self.attr)
return ''
def __set__(self, obj, val): def __set__(self, obj, val):
if val == None: if val == None:
@ -618,7 +619,7 @@ def main():
fields = LRFMetaFile.__dict__.items() fields = LRFMetaFile.__dict__.items()
fields.sort() fields.sort()
for f in fields: for f in fields:
if "XML" in str(f): if "XML" in str(f):
print str(f[1]) + ":", lrf.__getattribute__(f[0]).encode('utf-8') print str(f[1]) + ":", lrf.__getattribute__(f[0]).encode('utf-8')
if options.get_thumbnail: if options.get_thumbnail:
print "Thumbnail:", td print "Thumbnail:", td