SF 563203. Replaced 'has_key()' with 'in'.

This commit is contained in:
Raymond Hettinger 2002-06-01 14:18:47 +00:00
parent 9d5e4aa414
commit 54f0222547
54 changed files with 243 additions and 222 deletions

View file

@ -84,9 +84,9 @@ class netrc:
def authenticators(self, host):
"""Return a (user, account, password) tuple for given host."""
if self.hosts.has_key(host):
if host in self.hosts:
return self.hosts[host]
elif self.hosts.has_key('default'):
elif 'default' in self.hosts:
return self.hosts['default']
else:
return None