mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -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'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.cam>'
|
__copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.cam>'
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import copy
|
import copy
|
||||||
import re
|
import re
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
@ -187,7 +185,7 @@ class MobiMLizer(object):
|
|||||||
while vspace > 0:
|
while vspace > 0:
|
||||||
wrapper.addprevious(etree.Element(XHTML('br')))
|
wrapper.addprevious(etree.Element(XHTML('br')))
|
||||||
vspace -= 1
|
vspace -= 1
|
||||||
if istate.halign != 'auto':
|
if istate.halign != 'auto' and isinstance(istate.halign, (str, unicode)):
|
||||||
para.attrib['align'] = istate.halign
|
para.attrib['align'] = istate.halign
|
||||||
pstate = bstate.istate
|
pstate = bstate.istate
|
||||||
if tag in CONTENT_TAGS:
|
if tag in CONTENT_TAGS:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user