From 958c6334b02cafb0837e8435e45864841122b3f4 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 1 Jul 2009 13:49:39 +0000 Subject: [PATCH] suppress depreciation warnings generated by twisted --- deluge/main.py | 5 +++++ deluge/ui/ui.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/deluge/main.py b/deluge/main.py index 35e6ea750..f25dde049 100644 --- a/deluge/main.py +++ b/deluge/main.py @@ -48,6 +48,7 @@ import deluge.common import deluge.configmanager import deluge.error + def start_ui(): """Entry point for ui script""" import deluge.common @@ -125,6 +126,10 @@ def start_daemon(): """Entry point for daemon script""" import deluge.common + if 'dev' not in deluge.common.get_version(): + import warnings + warnings.filterwarnings('ignore', module='twisted.internet._sslverify') + # Setup the argument parser parser = OptionParser(usage="%prog [options] [actions]", version=deluge.common.get_version()) diff --git a/deluge/ui/ui.py b/deluge/ui/ui.py index d69b612f8..bb5b3f03f 100644 --- a/deluge/ui/ui.py +++ b/deluge/ui/ui.py @@ -38,11 +38,16 @@ 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') + class _UI(object): def __init__(self, name="gtk"):