From 920f2ea4886da04a8c8e8a3a1a4334f586bf90b6 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 29 Jul 2016 15:25:28 +0100 Subject: [PATCH] tiny py stuff --- TODO | 42 +--------------------------- python/packages/gi/overrides/Vips.py | 2 +- 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/TODO b/TODO index 3d9484c3..c9790b1c 100644 --- a/TODO +++ b/TODO @@ -3,50 +3,12 @@ $ vips avg broken.jpg[fail] about 50% of the time it'll trigger a range of out-of-order reads and lock - for 10s or so while seq waits - -- try: - - #!/usr/bin/python - - import sys - - import gi - gi.require_version('Vips', '8.0') - from gi.repository import Vips - - try: - im = Vips.Image.new_from_file(sys.argv[1]) - im.avg() - except Vips.Error as e: - print 'saw an error <<%s>>' % e.message - print 'vips error buffer start:' - print Vips.error_buffer() - print 'vips error buffer stop' - - see: - - $ ./read.py broken.jpg[fail] - vips warning: linecache: error in tile 0 x 192 - vips warning: linecache: error in tile 0 x 200 - saw an error <> - vips error buffer start: - - vips error buffer stop - - error msg is lost + for 10s or so while seq times out - add more webp tests to py suite - try moving some more of the CLI tests to py -- the gif tests in the suite sometimes fail with giflib5 because of an - uninitialized struct in giflib, see - - https://sourceforge.net/p/giflib/bugs/94/ - - sadly ubuntu 16.04 only comes with giflib5, and giflib5 is currently broken - - I like the new int mask creator in reducev, can we use it in im_vips2imask() as well? @@ -56,8 +18,6 @@ - could load pdf thumbnails? -- still not happy about float->int mask conversion in im_vips2mask.c - - colour needs to split _build() into preprocess / process / postprocess phases diff --git a/python/packages/gi/overrides/Vips.py b/python/packages/gi/overrides/Vips.py index b015779e..2da074d0 100644 --- a/python/packages/gi/overrides/Vips.py +++ b/python/packages/gi/overrides/Vips.py @@ -176,7 +176,7 @@ class Error(Exception): """ def __init__(self, message, detail = None): self.message = message - if detail == None: + if detail == None or detail == "": detail = Vips.error_buffer() Vips.error_clear() self.detail = detail