summaryrefslogtreecommitdiffstats
path: root/Lib/ftplib.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-01 14:18:47 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-06-01 14:18:47 (GMT)
commit54f0222547b1e92cd018ef132307a6f793dc9505 (patch)
tree667480d89feb3f9c7ca44e4ffa7bf39e725c120d /Lib/ftplib.py
parent9d5e4aa4149edb92f6d28c9390d776ae4a1d719a (diff)
downloadcpython-54f0222547b1e92cd018ef132307a6f793dc9505.zip
cpython-54f0222547b1e92cd018ef132307a6f793dc9505.tar.gz
cpython-54f0222547b1e92cd018ef132307a6f793dc9505.tar.bz2
SF 563203. Replaced 'has_key()' with 'in'.
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r--Lib/ftplib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 4a3d884..2e5cb33 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -660,7 +660,7 @@ class Netrc:
def __init__(self, filename=None):
if filename is None:
- if os.environ.has_key("HOME"):
+ if "HOME" in os.environ:
filename = os.path.join(os.environ["HOME"],
".netrc")
else:
@@ -714,7 +714,7 @@ class Netrc:
self.__defpasswd = passwd or self.__defpasswd
self.__defacct = acct or self.__defacct
if host:
- if self.__hosts.has_key(host):
+ if host in self.__hosts:
ouser, opasswd, oacct = \
self.__hosts[host]
user = user or ouser
@@ -736,7 +736,7 @@ class Netrc:
"""
host = host.lower()
user = passwd = acct = None
- if self.__hosts.has_key(host):
+ if host in self.__hosts:
user, passwd, acct = self.__hosts[host]
user = user or self.__defuser
passwd = passwd or self.__defpasswd