mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-05 08:40:13 -04:00
Fix #1995 (TypeError: Argument must be string or unicode.)
This commit is contained in:
parent
02859204e6
commit
9671f1ff54
@ -6,8 +6,6 @@ from __future__ import with_statement
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.cam>'
|
||||
|
||||
import sys
|
||||
import os
|
||||
import copy
|
||||
import re
|
||||
from lxml import etree
|
||||
@ -187,7 +185,7 @@ class MobiMLizer(object):
|
||||
while vspace > 0:
|
||||
wrapper.addprevious(etree.Element(XHTML('br')))
|
||||
vspace -= 1
|
||||
if istate.halign != 'auto':
|
||||
if istate.halign != 'auto' and isinstance(istate.halign, (str, unicode)):
|
||||
para.attrib['align'] = istate.halign
|
||||
pstate = bstate.istate
|
||||
if tag in CONTENT_TAGS:
|
||||
|
Loading…
x
Reference in New Issue
Block a user