From 74627f682a7ad8eff39015361c44053f736d804d Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 1 Jul 2009 13:51:56 +0000 Subject: [PATCH] use only "twisted" in the module arg as that suppresses all warnings from twisted --- deluge/main.py | 2 +- deluge/ui/ui.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/deluge/main.py b/deluge/main.py index f25dde049..d1090085c 100644 --- a/deluge/main.py +++ b/deluge/main.py @@ -128,7 +128,7 @@ def start_daemon(): if 'dev' not in deluge.common.get_version(): import warnings - warnings.filterwarnings('ignore', module='twisted.internet._sslverify') + warnings.filterwarnings('ignore', module='twisted') # Setup the argument parser parser = OptionParser(usage="%prog [options] [actions]", diff --git a/deluge/ui/ui.py b/deluge/ui/ui.py index bb5b3f03f..257c51b24 100644 --- a/deluge/ui/ui.py +++ b/deluge/ui/ui.py @@ -38,15 +38,14 @@ import deluge.common import deluge.configmanager import deluge.log import os -import warnings DEFAULT_PREFS = { "default_ui": "gtk" } if 'dev' not in deluge.common.get_version(): - warnings.filterwarnings('ignore', module='twisted.persisted.sob') - warnings.filterwarnings('ignore', module='twisted.python.filepath') + import warnings + warnings.filterwarnings('ignore', module='twisted') class _UI(object):