From d2e8ec09fa98b44803d13ecbebe2cc0593178575 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Feb 2013 23:17:35 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/polish/container.py | 4 +--- src/calibre/ebooks/oeb/polish/subset.py | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index 01b2f62ab2..e82bffe5dd 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -237,15 +237,13 @@ class Container(object): def compare_to(self, other): if set(self.name_path_map) != set(other.name_path_map): - return ['Set of files is not the same'] + return 'Set of files is not the same' mismatches = [] for name, path in self.name_path_map.iteritems(): opath = other.name_path_map[name] with open(path, 'rb') as f1, open(opath, 'rb') as f2: if f1.read() != f2.read(): mismatches.append('The file %s is not the same'%name) - import subprocess - subprocess.call(['kompare', path, opath]) return '\n'.join(mismatches) # EPUB {{{ diff --git a/src/calibre/ebooks/oeb/polish/subset.py b/src/calibre/ebooks/oeb/polish/subset.py index 3bb49dbdba..76906ed3ca 100644 --- a/src/calibre/ebooks/oeb/polish/subset.py +++ b/src/calibre/ebooks/oeb/polish/subset.py @@ -71,4 +71,6 @@ def subset_all_fonts(container, font_stats, report): if remove_font_face_rules(container, sheet, remove): style.text = sheet.cssText container.dirty(name) + report('Reduced total font size to %.1f%% of original'%( + total_new/total_old*100))