From 653d5fbd88cb7dd1e3ce551250bc88204e382df2 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 6 Dec 2018 12:49:48 +0100 Subject: [PATCH] update: fix running on trusty and things with old PIL/Pillow --- fdroidserver/update.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 2862e07e..5b33d805 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -46,7 +46,8 @@ from .common import SdkToolsPopen from .exception import BuildException, FDroidException from PIL import Image, PngImagePlugin -warnings.simplefilter('error', Image.DecompressionBombWarning) +if hasattr(Image, 'DecompressionBombWarning'): + warnings.simplefilter('error', Image.DecompressionBombWarning) Image.MAX_IMAGE_PIXELS = 0xffffff # 4096x4096 METADATA_VERSION = 21