summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-03-21 17:06:20 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-03-21 17:06:20 (GMT)
commit660252047347d1effbe00162ff990fc7a57d4d2a (patch)
tree9005a52cce5ef585592fa7a69b0e8229227cfd7f
parent93d448198b2a883639ed2c2e30f1f0fd7f002a90 (diff)
downloadcpython-660252047347d1effbe00162ff990fc7a57d4d2a.zip
cpython-660252047347d1effbe00162ff990fc7a57d4d2a.tar.gz
cpython-660252047347d1effbe00162ff990fc7a57d4d2a.tar.bz2
SF bug 917108: warnings.py does not define _test().
Removed the entire __name__ == '__main__' block.
-rw-r--r--Lib/warnings.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py
index c6e6006..849cced 100644
--- a/Lib/warnings.py
+++ b/Lib/warnings.py
@@ -249,11 +249,6 @@ def _getcategory(category):
return cat
# Module initialization
-if __name__ == "__main__":
- import __main__
- sys.modules['warnings'] = __main__
- _test()
-else:
- _processoptions(sys.warnoptions)
- simplefilter("ignore", category=OverflowWarning, append=1)
- simplefilter("ignore", category=PendingDeprecationWarning, append=1)
+_processoptions(sys.warnoptions)
+simplefilter("ignore", category=OverflowWarning, append=1)
+simplefilter("ignore", category=PendingDeprecationWarning, append=1)