From 19d7f6d39fcc235105896203ca37b750ca9350cb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 18 Jan 2011 14:02:27 -0700 Subject: [PATCH] ... --- src/calibre/ebooks/html/input.py | 4 ++-- src/calibre/utils/date.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/html/input.py b/src/calibre/ebooks/html/input.py index 1f07f4ca41..ac16e459e8 100644 --- a/src/calibre/ebooks/html/input.py +++ b/src/calibre/ebooks/html/input.py @@ -21,7 +21,7 @@ from calibre.customize.conversion import InputFormatPlugin from calibre.ebooks.chardet import xml_to_unicode from calibre.customize.conversion import OptionRecommendation from calibre.constants import islinux, isfreebsd, iswindows -from calibre import unicode_path +from calibre import unicode_path, as_unicode from calibre.utils.localization import get_lang from calibre.utils.filenames import ascii_filename from calibre.ebooks.conversion.utils import PreProcessor @@ -112,7 +112,7 @@ class HTMLFile(object): with open(self.path, 'rb') as f: src = f.read() except IOError, err: - msg = 'Could not read from file: %s with error: %s'%(self.path, unicode(err)) + msg = 'Could not read from file: %s with error: %s'%(self.path, as_unicode(err)) if level == 0: raise IOError(msg) raise IgnoreFile(msg, err.errno) diff --git a/src/calibre/utils/date.py b/src/calibre/utils/date.py index bc16ebb0b6..f67f51ffc6 100644 --- a/src/calibre/utils/date.py +++ b/src/calibre/utils/date.py @@ -52,7 +52,7 @@ def is_date_undefined(qt_or_dt): return True if hasattr(d, 'toString'): d = datetime(d.year(), d.month(), d.day(), tzinfo=utc_tz) - return d.year == UNDEFINED_DATE.year and \ + return d.year <= UNDEFINED_DATE.year and \ d.month == UNDEFINED_DATE.month and \ d.day == UNDEFINED_DATE.day