ó uÈÔec@€s\ddlmZddlmZmZddlmZddlZdefd„ƒYZdS(iÿÿÿÿ(twith_statement(t UbuntuPlugint DebianPlugin(t DebianPolicyNt UbuntuPolicycB€s{eZdZdZdZddZdZdZdZdZ dd„Z e d „ƒZ d „Zd „Zd „Zd „ZRS(tUbuntut Canonicalshttps://www.ubuntu.com/s9/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/gamess):/usr/local/sbin:/usr/local/bin:/snap/bins,https://files.support.canonical.com/uploads/tubuntutputcC€s,tt|ƒjd|ƒttg|_dS(Ntsysroot(tsuperRt__init__RRtvalid_subclasses(tselfR ((s7/usr/lib/python2.7/site-packages/sos/policies/ubuntu.pyR scC€sEy,tddƒ}d|jƒkSWdQXWntk r@tSXdS(s[This method checks to see if we are running on Ubuntu. It returns True or False.s/etc/lsb-releasetrRN(topentreadtIOErrortFalse(tclstfp((s7/usr/lib/python2.7/site-packages/sos/policies/ubuntu.pytchecks  cC€syy`tddƒG}|jƒ}x1|D])}d|kr(|jdƒdjƒSq(WWdQXtSWntk rttSXdS(s7 Returns the version stated in DISTRIB_RELEASE s/etc/lsb-releaseRtDISTRIB_RELEASEt=iN(Rt readlinestsplittstripRR(R Rtlinestline((s7/usr/lib/python2.7/site-packages/sos/policies/ubuntu.pyt dist_version"s   ! cC€s<|jj|jƒr%|j|jfStt|ƒjƒSdS(N(t upload_urlt startswitht _upload_urlt _upload_usert_upload_passwordR Rtget_upload_https_auth(R ((s7/usr/lib/python2.7/site-packages/sos/policies/ubuntu.pyR#/scC€s'|jj|jƒrdS|jƒSdS(NsCanonical Support File Server(RRR tget_upload_url(R ((s7/usr/lib/python2.7/site-packages/sos/policies/ubuntu.pytget_upload_url_string5scC€sV|j s|jj|jƒr?tjj|jƒ}|j|Stt|ƒj ƒdS(N( RRR tostpathtbasenametupload_archiveR RR$(R tfname((s7/usr/lib/python2.7/site-packages/sos/policies/ubuntu.pyR$;s N(t__name__t __module__tdistrotvendort vendor_urltPATHR R!R"t_upload_methodtNoneR t classmethodRRR#R%R$(((s7/usr/lib/python2.7/site-packages/sos/policies/ubuntu.pyR s   ( t __future__Rt sos.pluginsRRtsos.policies.debianRR&R(((s7/usr/lib/python2.7/site-packages/sos/policies/ubuntu.pyts