re #33 - fix typo, be more pythonic

(cherry picked from commit 803820c3c8b1aaf2a11588431582916dbb23ea1e)
This commit is contained in:
Jan Brauer 2012-07-12 22:19:49 +02:00 committed by Jeff Forcier
parent d18b8cf1e9
commit 7f526044e0
1 changed files with 1 additions and 3 deletions

View File

@ -105,11 +105,9 @@ class SSHConfig (object):
""" """
matches = [x for x in self._config if fnmatch.fnmatch(hostname, x['host'])] matches = [x for x in self._config if fnmatch.fnmatch(hostname, x['host'])]
# Move * to the end # Move * to the end
_star = matches[0] _star = matches.pop(0)
del matches[0]
matches.append(_star) matches.append(_star)
ret = {} ret = {}
ret = {}
for m in matches: for m in matches:
for k,v in m.iteritems(): for k,v in m.iteritems():
if not k in ret: if not k in ret: