From a4f9e4406bbf6114b6f7092acb63d93008680af9 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Thu, 18 Oct 2007 13:29:49 -0700 Subject: Added a call to warnings.filterwarnings() to misc/paths.py.in to supress the Python 2.5 DeprecationWarning on string exceptions. --- misc/paths.py.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'misc') 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') -- cgit v1.2.3