Skip to content

Commit

Permalink
Change signature to (haystack, needle).
Browse files Browse the repository at this point in the history
This brings the code more inline with the code around it and also
the python stdlib in general.
  • Loading branch information
lndbrg committed Aug 19, 2014
1 parent 2370f0b commit 3e94fc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paramiko/config.py
Expand Up @@ -112,7 +112,7 @@ def lookup(self, hostname):
:param str hostname: the hostname to lookup
"""
matches = [config for config in self._config if
self._allowed(hostname, config['host'])]
self._allowed(config['host'], hostname)]

ret = {}
for match in matches:
Expand All @@ -128,7 +128,7 @@ def lookup(self, hostname):
ret = self._expand_variables(ret, hostname)
return ret

def _allowed(self, hostname, hosts):
def _allowed(self, hosts, hostname):
match = False
for host in hosts:
if host.startswith('!') and fnmatch.fnmatch(hostname, host[1:]):
Expand Down

0 comments on commit 3e94fc8

Please sign in to comment.