IGN:Fix typo that was preventing EPUB Output from working in absence of X server

This commit is contained in:
Kovid Goyal 2009-08-14 10:27:47 -06:00
parent 831ce503f4
commit 5e98eb1d29
2 changed files with 2 additions and 3 deletions

View file

@ -161,10 +161,8 @@ def convert(self, oeb, output_path, input_plugin, opts, log):
)
split(self.oeb, self.opts)
self.workaround_ade_quirks()
self.workaround_webkit_quirks()
from calibre.ebooks.oeb.transforms.rescale import RescaleImages
RescaleImages()(oeb, opts)
self.insert_cover()
@ -194,6 +192,7 @@ def default_cover(self):
'''
if self.opts.no_default_epub_cover:
return None
self.log('Generating default cover')
try:
from calibre.gui2 import images_rc, is_ok_to_use_qt # Needed for access to logo
from PyQt4.Qt import QFile, QIODevice

View file

@ -538,7 +538,7 @@ def __init__(self, args):
def is_ok_to_use_qt():
global gui_thread
if islinux and ':' in os.environ.get('DISPLAY', ''):
if islinux and ':' not in os.environ.get('DISPLAY', ''):
return False
if QApplication.instance() is None:
QApplication([])