summaryrefslogtreecommitdiff
path: root/argparse.py
diff options
context:
space:
mode:
authorsteven.bethard <devnull@localhost>2009-09-12 16:48:40 +0000
committersteven.bethard <devnull@localhost>2009-09-12 16:48:40 +0000
commitadfb02cfbbd3205b5f86a475ac4f9080337eb1c5 (patch)
treec835e5476e4dc8ef737f6a76c68d8de0a2a31c29 /argparse.py
parentc1d15883256c5962d04deb84e23cc807ad68c59e (diff)
downloadargparse-adfb02cfbbd3205b5f86a475ac4f9080337eb1c5.tar.gz
Silence Python 2.6 buggy warnings about Exception.message.
Diffstat (limited to 'argparse.py')
-rw-r--r--argparse.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/argparse.py b/argparse.py
index 1996f46..0f407e7 100644
--- a/argparse.py
+++ b/argparse.py
@@ -118,6 +118,15 @@ except NameError:
result.reverse()
return result
+# silence Python 2.6 buggy warnings about Exception.message
+if _sys.version_info[:2] == (2, 6):
+ import warnings
+ warnings.filterwarnings(
+ action='ignore',
+ message='BaseException.message has been deprecated as of Python 2.6',
+ category=DeprecationWarning,
+ module='argparse')
+
SUPPRESS = '==SUPPRESS=='