mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
158a168b1d
commit
8df0f92750
@ -17,11 +17,11 @@ class BaseError(object):
|
||||
|
||||
HELP = ''
|
||||
INDIVIDUAL_FIX = ''
|
||||
level = ERROR
|
||||
|
||||
def __init__(self, msg, name, line=None, col=None):
|
||||
self.msg, self.line, self.col = msg, line, col
|
||||
self.name = name
|
||||
self.level = ERROR
|
||||
|
||||
def __str__(self):
|
||||
return '%s:%s (%s, %s):%s' % (self.__class__.__name__, self.name, self.line, self.col, self.msg)
|
||||
|
@ -8,7 +8,7 @@ __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
from calibre import as_unicode
|
||||
from calibre.utils.magick import Image
|
||||
from calibre.ebooks.oeb.polish.check.base import BaseError
|
||||
from calibre.ebooks.oeb.polish.check.base import BaseError, WARN
|
||||
|
||||
class InvalidImage(BaseError):
|
||||
|
||||
@ -24,6 +24,7 @@ class CMYKImage(BaseError):
|
||||
' colors are specified in the CMYK colorspace. You should convert this image'
|
||||
' to the RGB colorspace, for maximum compatibility.')
|
||||
INDIVIDUAL_FIX = _('Convert image to RGB automatically')
|
||||
level = WARN
|
||||
|
||||
def __call__(self, container):
|
||||
from PyQt4.Qt import QImage
|
||||
|
Loading…
x
Reference in New Issue
Block a user