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.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())

View File

@ -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"):