]> granicus.if.org Git - python/commitdiff
Backport bug fix for SF bug report #1546372.
authorMarc-André Lemburg <mal@egenix.com>
Wed, 6 Sep 2006 20:38:50 +0000 (20:38 +0000)
committerMarc-André Lemburg <mal@egenix.com>
Wed, 6 Sep 2006 20:38:50 +0000 (20:38 +0000)
Misc/NEWS
Tools/pybench/pybench.py

index 316f1f53ddcd15fe91e17d9d12de13da2ab5d3cb..2cad993d9dafb5fe6a2b4265d073818c7f7e3f75 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -83,6 +83,13 @@ Documentation
   to a newly created list object and add notes that this isn't a good idea.
 
 
+Tools
+-----
+
+- Bug #1546372: Fixed small bugglet in pybench that caused a missing
+  file not to get reported properly.
+
+
 Build
 -----
 
index 7d90ba1f39eabf848c8fd5e44e8a315d7afe6cb0..242f0399b5d64c136f52e55075ae4f0fdd02d5dd 100755 (executable)
@@ -885,7 +885,7 @@ python pybench.py -s p25.pybench -c p21.pybench
                 else:
                     bench.print_benchmark(hidenoise=hidenoise,
                                           limitnames=limitnames)
-            except IOError:
+            except IOError, reason:
                 print '* Error opening/reading file %s: %s' % (
                     repr(show_bench),
                     reason)
@@ -931,8 +931,13 @@ python pybench.py -s p25.pybench -c p21.pybench
                 bench.name = reportfile
                 pickle.dump(bench,f)
                 f.close()
-            except IOError:
+            except IOError, reason:
                 print '* Error opening/writing reportfile'
+            except IOError, reason:
+                print '* Error opening/writing reportfile %s: %s' % (
+                    reportfile,
+                    reason)
+                print
 
 if __name__ == '__main__':
     PyBenchCmdline()