summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/xml/sax/__init__.py')
-rw-r--r--Lib/xml/sax/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xml/sax/__init__.py b/Lib/xml/sax/__init__.py
index 054064c..d55ffb7 100644
--- a/Lib/xml/sax/__init__.py
+++ b/Lib/xml/sax/__init__.py
@@ -59,7 +59,7 @@ if _false:
import xml.sax.expatreader
import os, sys
-if os.environ.has_key("PY_SAX_PARSER"):
+if "PY_SAX_PARSER" in os.environ:
default_parser_list = os.environ["PY_SAX_PARSER"].split(",")
del os
@@ -81,7 +81,7 @@ def make_parser(parser_list = []):
return _create_parser(parser_name)
except ImportError,e:
import sys
- if sys.modules.has_key(parser_name):
+ if parser_name in sys.modules:
# The parser module was found, but importing it
# failed unexpectedly, pass this exception through
raise