# HG changeset patch # User Daniele Nicolodi # Date 1311632626 -7200 # Node ID 5dfa71aadde888d58c80bfacf45f0e130723bca9 # Parent ce7734a6b6ad938cd81e120c87a5f3997c286722 Silence MySQLdb warnings in admin interface. diff -r ce7734a6b6ad -r 5dfa71aadde8 src/ltpdarepo/admin.py --- a/src/ltpdarepo/admin.py Wed Jun 29 01:46:06 2011 +0200 +++ b/src/ltpdarepo/admin.py Tue Jul 26 00:23:46 2011 +0200 @@ -1,5 +1,6 @@ import argparse import logging +import warnings from contextlib import contextmanager from pprint import pprint @@ -326,6 +327,9 @@ logger.addHandler(handler) logger.setLevel(logging.WARNING) + # silence annoying mysql warnings + warnings.filterwarnings('ignore', module='MySQLdb') + # dispatch command line return commands.dispatch()