diff options
author | Mark Sapiro <msapiro@value.net> | 2007-10-18 13:29:49 -0700 |
---|---|---|
committer | Mark Sapiro <msapiro@value.net> | 2007-10-18 13:29:49 -0700 |
commit | a4f9e4406bbf6114b6f7092acb63d93008680af9 (patch) | |
tree | 2ebd7d46c3cd5a46e56fb6fe39a36d8fc7e1a655 | |
parent | 255f1f88d6bebb782d8e806ee6e69314322c46c9 (diff) | |
download | mailman2-a4f9e4406bbf6114b6f7092acb63d93008680af9.tar.gz mailman2-a4f9e4406bbf6114b6f7092acb63d93008680af9.tar.xz mailman2-a4f9e4406bbf6114b6f7092acb63d93008680af9.zip |
Added a call to warnings.filterwarnings() to misc/paths.py.in to supress the
Python 2.5 DeprecationWarning on string exceptions.
-rw-r--r-- | misc/paths.py.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/misc/paths.py.in b/misc/paths.py.in index 3566a12c..bbf18fc7 100644 --- a/misc/paths.py.in +++ b/misc/paths.py.in @@ -1,6 +1,6 @@ # -*- python -*- -# Copyright (C) 1998-2005 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -24,8 +24,9 @@ # attributes that other modules may use to get the absolute path to the # installed Mailman distribution. -import sys import os +import sys +from warnings import filterwarnings # some scripts expect this attribute to be in this module prefix = '@prefix@' @@ -35,6 +36,9 @@ exec_prefix = '@exec_prefix@' if exec_prefix == '${prefix}': exec_prefix = prefix +# Supress Python 2.5 warning about string exceptions. +filterwarnings('ignore', '.* string exception', DeprecationWarning) + # Check if ja/ko codecs are available before changing path. try: s = unicode('OK', 'iso-2022-jp') |