From 8ed28a95e7386d153c76b196de9f47c9854cc949 Mon Sep 17 00:00:00 2001 From: david-sarah Date: Fri, 28 May 2010 22:05:37 -0700 Subject: [PATCH] Move suppression of DeprecationWarning about BaseException.message from sftpd.py to main __init__.py. Also, remove the global suppression of the 'integer argument expected, got float' warning, which turned out to be a bug. --- src/allmydata/__init__.py | 7 +++---- src/allmydata/frontends/sftpd.py | 7 ------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/allmydata/__init__.py b/src/allmydata/__init__.py index 1f9a265b..acaeda27 100644 --- a/src/allmydata/__init__.py +++ b/src/allmydata/__init__.py @@ -35,11 +35,10 @@ finally: warnings.filters.pop() warnings.filters.pop() - +# This warning is generated by twisted, but not when it is imported, only on an error. warnings.filterwarnings("ignore", category=DeprecationWarning, - message="integer argument expected, got float", - append=True) - + message="BaseException.message has been deprecated as of Python 2.6", + module=".*twisted.*", append=True) __version__ = "unknown" try: diff --git a/src/allmydata/frontends/sftpd.py b/src/allmydata/frontends/sftpd.py index e0516d81..e44270d8 100644 --- a/src/allmydata/frontends/sftpd.py +++ b/src/allmydata/frontends/sftpd.py @@ -33,13 +33,6 @@ from allmydata.immutable.upload import FileHandle from pycryptopp.cipher.aes import AES -# twisted.conch.ssh.filetransfer generates this warning, but not when it is imported, -# only on an error. -import warnings -warnings.filterwarnings("ignore", category=DeprecationWarning, - message="BaseException.message has been deprecated as of Python 2.6", - module=".*filetransfer", append=True) - noisy = True use_foolscap_logging = True -- 2.45.2