bindings: Filter out various pygccxml noise.

This commit is contained in:
Bert Vermeulen 2014-07-19 19:48:01 +02:00
parent 580ed4005b
commit 6884b52bde
1 changed files with 9 additions and 0 deletions

View File

@ -17,10 +17,19 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>. ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## ##
import logging, warnings
from pygccxml import parser, declarations from pygccxml import parser, declarations
from collections import OrderedDict from collections import OrderedDict
import sys, os, re 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. # Get directory this script is in.
dirname = os.path.dirname(os.path.realpath(__file__)) dirname = os.path.dirname(os.path.realpath(__file__))