From fe2bd2834ead1c61793ca0e1b8ee8bc14d1d5e0c Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Sun, 30 Dec 2007 21:00:28 +0000 Subject: [PATCH] Patch from Raphael Ackermann to fix undefined variables in HtmlDoc.py. svn: r9644 --- ChangeLog | 3 +++ src/docgen/HtmlDoc.py | 16 +++++----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95bbb5946..1a6a302b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2007-12-30 Raphael Ackermann + * src/docgen/HtmlDoc.py: Fix undefined variables. + 2007-12-30 Douglas S. Blank * src/plugins/OnThisDay.py: i18n changes * src/plugins/Makefile.am: added missing files diff --git a/src/docgen/HtmlDoc.py b/src/docgen/HtmlDoc.py index 1adfc8daf..70212b720 100644 --- a/src/docgen/HtmlDoc.py +++ b/src/docgen/HtmlDoc.py @@ -374,7 +374,7 @@ class HtmlDoc(BaseDoc.BaseDoc,BaseDoc.TextDoc): return try: - ImgManip.resize_to_jpeg(name, newfile, size, size) + ImgManip.resize_to_jpeg(name, refname, size, size) except: return @@ -385,18 +385,12 @@ class HtmlDoc(BaseDoc.BaseDoc,BaseDoc.TextDoc): else: xtra = '' - imgsize = img.size() - if imgsize[0] > imgsize[1]: - size_str = "width" - else: - size_str = "height" - if self.image_dir: - self.f.write('%s\n' % \ - (self.image_dir,refname,size_str,size,alt,xtra)) + self.f.write('%s\n' % \ + (self.image_dir, refname, alt, xtra)) else: - self.f.write('%s\n' - % (refname,size_str,size,alt,xtra)) + self.f.write('%s\n' + % (refname, alt, xtra)) def start_table(self,name,style): styles = self.get_style_sheet()