From 781e3c785fabcd9c85263f797d187a7350ddc102 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 14 Dec 2017 20:30:00 +0100 Subject: [PATCH] always hide PIL.PngImagePlugin's "STREAM" debug messages Otherwise, enabling verbose messages gives tons of these messages: DEBUG: STREAM b'IHDR' 16 13 DEBUG: STREAM b'IDAT' 41 32768 --- fdroidserver/common.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 624e9353..8248a944 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -128,6 +128,13 @@ default_config = { def setup_global_opts(parser): + try: # the buildserver VM might not have PIL installed + from PIL import PngImagePlugin + logger = logging.getLogger(PngImagePlugin.__name__) + logger.setLevel(logging.INFO) # tame the "STREAM" debug messages + except ImportError: + pass + parser.add_argument("-v", "--verbose", action="store_true", default=False, help=_("Spew out even more information than normal")) parser.add_argument("-q", "--quiet", action="store_true", default=False, -- 2.30.2