From: Bert Vermeulen Date: Sat, 19 Jul 2014 17:48:01 +0000 (+0200) Subject: bindings: Filter out various pygccxml noise. X-Git-Tag: libsigrok-0.4.0~1240 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6884b52bdefb7ed7169d557e1125f5b36276e2bf;p=libsigrok.git bindings: Filter out various pygccxml noise. --- diff --git a/bindings/cxx/enums.py b/bindings/cxx/enums.py index f5f6e58d..46a14724 100644 --- a/bindings/cxx/enums.py +++ b/bindings/cxx/enums.py @@ -17,10 +17,19 @@ ## along with this program. If not, see . ## +import logging, warnings from pygccxml import parser, declarations from collections import OrderedDict import sys, os, re +class crapfilter(logging.Filter): + def filter(self, record): + if record.msg.find('GCCXML version') > -1: + return 0 + return 1 +logger = logging.getLogger('pygccxml.cxx_parser').addFilter(crapfilter()) +warnings.filterwarnings('ignore', message="unable to find out array size from expression") + # Get directory this script is in. dirname = os.path.dirname(os.path.realpath(__file__))