From 3e94fc8cd5562c04f63f149034e18274beab7ebe Mon Sep 17 00:00:00 2001 From: Olle Lundberg Date: Tue, 19 Aug 2014 20:57:01 +0200 Subject: [PATCH] Change signature to (haystack, needle). This brings the code more inline with the code around it and also the python stdlib in general. --- paramiko/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paramiko/config.py b/paramiko/config.py index b1db4bd53..5a4ecf81d 100644 --- a/paramiko/config.py +++ b/paramiko/config.py @@ -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: @@ -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:]):