Fix #1014103 (Error when converting any format to LRF)

This commit is contained in:
Kovid Goyal 2012-06-17 09:28:23 +05:30
parent c0589a92fd
commit 38248a9e40

View File

@ -20,6 +20,11 @@ class LRFOptions(object):
except: except:
return '' return ''
m = oeb.metadata m = oeb.metadata
for x in ('left', 'top', 'right', 'bottom'):
attr = 'margin_'+x
val = getattr(opts, attr)
if val < 0:
setattr(opts, attr, 0)
self.title = None self.title = None
self.author = self.publisher = _('Unknown') self.author = self.publisher = _('Unknown')
self.title_sort = self.author_sort = '' self.title_sort = self.author_sort = ''