From aa6c883434eef0e9fb44493acc308c9f9cb5c079 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 5 Dec 2014 12:50:53 +0000 Subject: [PATCH] ignore missing class methods in Vips.py thanks Ben see https://github.com/jcupitt/libvips/issues/199 --- python/Vips.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/Vips.py b/python/Vips.py index 0eb1fc34..ddc29299 100644 --- a/python/Vips.py +++ b/python/Vips.py @@ -933,8 +933,12 @@ def generate_class_method(name): for nickname in class_methods: logging.debug('adding %s as a class method' % nickname) - method = generate_class_method(nickname) - setattr(Vips.Image, nickname, method) + # some may be missing in this vips, eg. we might not have "webpload" + try: + method = generate_class_method(nickname) + setattr(Vips.Image, nickname, method) + except Error: + pass Image = override(Image) __all__.append('Image')