This commit is contained in:
Kovid Goyal 2013-02-03 23:17:35 +05:30
parent e24d4cd7c0
commit d2e8ec09fa
2 changed files with 3 additions and 3 deletions

View File

@ -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 {{{

View File

@ -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))