ó =OXc@sxdZddlZddlZddlZddlZddlZdZdefd„ƒYZdefd„ƒYZ dS(s2 Configuration file (aka ``ssh_config``) support. i˙˙˙˙Nit SSHConfigcBs\eZdZejdƒZd„Zd„Zd„Zd„Z d„Z d„Z d„Z RS( sƒ Representation of config information as stored in the format used by OpenSSH. Queries can be made via `lookup`. The format is described in OpenSSH's ``ssh_config`` man page. This class is provided primarily as a convenience to posix users (since the OpenSSH format is a de-facto standard on posix) but should work fine on Windows too. .. versionadded:: 1.6 s(\w+)(?:\s*=\s*|\s+)(.+)cCs g|_dS(s5 Create a new OpenSSH config object. N(t_config(tself((s3/usr/lib/python2.7/site-packages/paramiko/config.pyt__init__.scCs¸idgd6id6}xŠ|D]‚}|jƒ}| s|jdƒrLqntj|j|ƒ}|sztd|ƒ‚n|jdƒjƒ}|jdƒ}|dkrÚ|jj |ƒi|j |ƒd6id6}q|dkr |jƒd kr d|d| Return a list of host_names from host value. sUnparsable host %sN(tshlexR<t ValueErrorR(RR((s3/usr/lib/python2.7/site-packages/paramiko/config.pyRęs ( t__name__t __module__t__doc__RtcompileRRRR&R+RR"R(((s3/usr/lib/python2.7/site-packages/paramiko/config.pyR!s   / * JR=cBs#eZdZdd„Zd„ZRS(s7 Returns the host's fqdn on request as string. cCsd|_||_||_dS(N(RRFRR(RRR((s3/usr/lib/python2.7/site-packages/paramiko/config.pyRůs  c Cs|jdkr d}|jjddƒjƒ}|dkräyŽ|dkrTtjntj}tj|j d|tj tj tj ƒ}x?|D]7}|\}}}} } | rŽd| krŽ| }PqŽqŽWWqätj k rŕqäXn|dkr˙tjƒ}n||_n|jS(Nt addressfamilytanytinetR3(RFRRtgetRR:tAF_INETtAF_INET6t getaddrinfoRt SOCK_DGRAMt IPPROTO_IPt AI_CANONNAMEtgaierrortgetfqdn( RRFtaddress_familytfamilytresultstrestaftsocktypetprotot canonnametsa((s3/usr/lib/python2.7/site-packages/paramiko/config.pyt__str__ţs2        N(RNRORPRRRg(((s3/usr/lib/python2.7/site-packages/paramiko/config.pyR=ôs ( RPR.R8RRLR:R7tobjectRR=(((s3/usr/lib/python2.7/site-packages/paramiko/config.pyts     Ó