From 8df0f9275086d72aa7877088731735000bf3812c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 9 Dec 2013 13:42:59 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/polish/check/base.py | 2 +- src/calibre/ebooks/oeb/polish/check/images.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/polish/check/base.py b/src/calibre/ebooks/oeb/polish/check/base.py index 087f481bd9..4f2a61f15a 100644 --- a/src/calibre/ebooks/oeb/polish/check/base.py +++ b/src/calibre/ebooks/oeb/polish/check/base.py @@ -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) diff --git a/src/calibre/ebooks/oeb/polish/check/images.py b/src/calibre/ebooks/oeb/polish/check/images.py index 7e69180dd1..97b583acda 100644 --- a/src/calibre/ebooks/oeb/polish/check/images.py +++ b/src/calibre/ebooks/oeb/polish/check/images.py @@ -8,7 +8,7 @@ __copyright__ = '2013, Kovid Goyal ' 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