suppress depreciation warnings generated by twisted

This commit is contained in:
Damien Churchill 2009-07-01 13:49:39 +00:00
parent 65697faca5
commit 958c6334b0
2 changed files with 10 additions and 0 deletions

View File

@ -48,6 +48,7 @@ import deluge.common
import deluge.configmanager import deluge.configmanager
import deluge.error import deluge.error
def start_ui(): def start_ui():
"""Entry point for ui script""" """Entry point for ui script"""
import deluge.common import deluge.common
@ -125,6 +126,10 @@ def start_daemon():
"""Entry point for daemon script""" """Entry point for daemon script"""
import deluge.common import deluge.common
if 'dev' not in deluge.common.get_version():
import warnings
warnings.filterwarnings('ignore', module='twisted.internet._sslverify')
# Setup the argument parser # Setup the argument parser
parser = OptionParser(usage="%prog [options] [actions]", parser = OptionParser(usage="%prog [options] [actions]",
version=deluge.common.get_version()) version=deluge.common.get_version())

View File

@ -38,11 +38,16 @@ import deluge.common
import deluge.configmanager import deluge.configmanager
import deluge.log import deluge.log
import os import os
import warnings
DEFAULT_PREFS = { DEFAULT_PREFS = {
"default_ui": "gtk" "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): class _UI(object):
def __init__(self, name="gtk"): def __init__(self, name="gtk"):