Mercurial > hg > ltpdarepo
changeset 42:5dfa71aadde8
Silence MySQLdb warnings in admin interface.
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Tue, 26 Jul 2011 00:23:46 +0200 |
parents | ce7734a6b6ad |
children | 80ed4131d0ad |
files | src/ltpdarepo/admin.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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()