Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/apport/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/apport/hookutils.pyc


Yc@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZmZddlmZddlZydjddZWn/ek
rddlZejddZnXdZded	Zd
ZdedZdddZd
Z dZ!dZ"dZ#dZ$dZ%dej&e'dZ(dZ)dej&dZ*dZ+dZ,ddZ-ddZ.dZ/dZ0dZ1dZ2dZ3d Z4d!Z5d"Z6d#Z7d$Z8d%Z9d&Z:d'Z;d(Z<dd)Z=d*Z>d+Z?d,Z@d-ZAd.ZBd/ZCd0ZDd1ZEd2ZFd3ZGd4ZHd5ZId6d7ZJd8ZKd9ZLd:ZMdd;ZNdS(<s/Convenience functions for use in package hooks.iN(tGiotGLib(timplts#/-_+ s....._cCswtjddkr@t|tdkrj|jd}qjn*t|tdkrj|jd}n|jtS(s{Generate a valid report key name from a file path.

    This will replace invalid punctuation symbols with valid ones.
    it3RsUTF-8(tsystversionttypetdecodetencodet	translatet_path_key_trans(tpath((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytpath_to_key*scCsA|st|}ntjj|r=t||||ndS(sAttach file contents if file exists.

    If key is not specified, the key name will be derived from the file
    name with path_to_key().

    If overwrite is True, an existing key will be updated. If it is False, a
    new key with '_' appended will be added instead.
    N(R
tosRtexiststattach_file(treportRtkeyt	overwrite((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_file_if_exists7s	cCsQy,t|d}|jjSWdQXWntk
rL}dt|SXdS(sReturn the contents of the specified path.

    Upon error, this will deliver a text representation of the error,
    instead of failing.
    trbNsError: (topentreadtstript	Exceptiontstr(Rtfte((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyt	read_fileFs
cCsO|st|}n|s;x||kr7|d7}qWnt|||<dS(s
Attach a file to the report.

    If key is not specified, the key name will be derived from the file
    name with path_to_key().

    If overwrite is True, an existing key will be updated. If it is False, a
    new key with '_' appended will be added instead.
    t_N(R
R(RRRR((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyRRs	c
Cstj|}x|jD]\}}|r@||kr@qndt|}|dkrl|||<qn|r|jd|}|r|||<qd||<n
d||<tjjtj|j	}	|	j
|dt|<qWdS(s(Attach information about any modified or deleted conffiles.

    If conffiles is given, only this subset will be attached. If ui is given,
    ask whether the contents of the file may be added to the report; if this is
    denied, or there is no UI, just mark it as "modified" in the report.
    smodified.conffile.s	[deleted]snIt seems you have modified the contents of "%s".  Would you like to add the contents of it to your bug report?s
[modified]smtime.conffile.N(t	packagingtget_modified_conffilestitemsR
tyesnotdatetimet
fromtimestampRtstattst_mtimet	isoformat(
Rtpackaget	conffilestuitmodifiedRtcontentsRtresponsetmtime((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_conffilesds 



cCsytjj|}Wntk
r*dSXxj|D]b}tjj|r2|jdr2|jdd}d|jdd}t	|||q2q2WdS(s3Attach information about any Upstart override filesNs
/etc/init/s.confs	.overridesupstart.R(
tapportRt	get_filest
ValueErrorRRRt
startswithtreplaceR(RR(tfilestfiletoverrideR((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_upstart_overridess

!cCsyD|jddjsCtd}|j|d<WdQXnWntk
rWnX|jddjstdddg}|jd	}|d
kr||d}n||d<ndS(swAttach information from the kernel ring buffer (dmesg).

    This will not overwrite already existing information.
    t	BootDmesgRs/var/log/dmesgNtCurrentDmesgtshs-cs1dmesg | comm -13 --nocheck-order /var/log/dmesg -s
[ii(tgetRRRtIOErrortcommand_outputtfind(RRtdmesgt
first_newline((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_dmesgs
c	Csd}tjj|rxtj|D]}d||f}tj|}tj|js(|jd@dkryq(n|d
krq(ny+t|}|jj	}WdQXWnt
tfk
rq(nX|r(||d|jdd	<q(q(WndS(Ns/sys/class/dmi/ids%s/%siit	subsystemtueventsdmi.Rt.(RCRD(
RRtisdirtlistdirR%tS_ISREGtst_modeRRRtOSErrorR=R4(Rtdmi_dirRtptsttfdtvalue((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyt
attach_dmis &cCs-t|t|ddt|ddt|ddt|ddtjjd	rutd
dg|d<ntd
g|d<tddg|d<tdddg|d<|djddd}tjdd|}tjdd|}tjdd|}tjdd|}tjdd|}tjdd|}|j	d|d<t
|d|krd |krd!|d|d f|d"<ntd#rtd#g|d$<ntd%r)td%d&gj}|r||d'<ntd%d(gj}|r)||d)<q)nd*S(+sPAttach a standard set of hardware-related data to the report, including:

    - kernel dmesg (boot and current)
    - /proc/interrupts
    - /proc/cpuinfo
    - /proc/cmdline
    - /proc/modules
    - lspci -vvnn
    - lsusb
    - devices from udev
    - DMI information from /sys
    - prtconf (sparc)
    - pccardctl status/ident
    s/proc/interruptstProcInterruptss
/proc/cpuinfotProcCpuinfos
/proc/cmdlinetProcKernelCmdLines
/var/log/udevtUdevLogs/sys/bus/pcitlspcis-vvnntLspcitlsusbtLsusbtsorts
/proc/modulestProcModulestudevadmtinfos--export-dbtUdevDbsUTF-8terrorsR4sID_FS_LABEL=(.*)sID_FS_LABEL=<hidden>sID_FS_LABEL_ENC=(.*)sID_FS_LABEL_ENC=<hidden>s
by-label/(.*)sby-label/<hidden>sdmi.sys.vendorsdmi.product.names%s %stMachineTypetprtconftPrtconft	pccardctltstatustPccardctlStatustidenttPccardctlIdentN(
RBRRRRR>RtretsubR	RPtcommand_availableR(Rtltout((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_hardwares>



c	Cst|tjjddt|tjjddt|dt|ddt|dd	td
ddg|d
<tddg|d<tddg|d<tt|d<g}tjjdr3t	dP}xF|D]>}d|kr|j
j}|jt
|dqqWWdQXnxV|D]N}d|}tddt|dg||<d|}tddt|g||<xtjd|D]}tjj|rtjj|}d|t|f}t||d|qtjj|rtjj|}x^tj|D]J}	tjj||	}
d|t|t|	f}t||
|q3WqqWq:Wtd d!gtjd"tjd#tjd$|d%<tjjd&rtd'd(g|d)<nt|t|dS(*svAttach ALSA subsystem information to the report.

    (loosely based on http://www.alsa-project.org/alsa-info.sh)
    s~/.asoundrctUserAsoundrcs~/.asoundrc.asoundconftUserAsoundrcAsoundconfs/etc/asound.confs/proc/asound/versiontAlsaVersions
/proc/cpuinfoRRtlss-ls	/dev/snd/tAlsaDevicestaplaytAplayDevicestarecordtArecordDevicest
PciMultimedias/proc/asound/cardss]:iNsCard%d.Amixer.infotamixers-cR\sCard%d.Amixer.valuess/proc/asound/card%d/codec*sCard%d.Codecs.%sRsCard%d.Codecs.%s.%stfusers-vs	/dev/dsp*s
/dev/snd/*s	/dev/seq*tAudioDevicesInUses/usr/bin/pacmdtpacmdtlistt	PulseList(RRRt
expanduserRR>tpci_devicestPCI_MULTIMEDIARRtlstriptsplittappendtintRtglobtisfiletbasenameR
RFRGtjoinRPRB(RtcardsRNtlinetfieldstcardRt	codecpathtcodectnameR((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_alsasP

'

"
:
cCsdtjkrtStjd}xf|jtjD]R}|sEq3ntjj||}tjj|r3tj|tj	r3t
Sq3WtS(s/Is given command on the executable search path?tPATH(RtenvirontFalseRtpathsepRRRtaccesstX_OKtTrue(tcommandRtelementtfilename((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyRi*s
'cCstjj}|s"d|d<nyCtj|dtjd|d|rOtjpRddtd|}Wntk
r}dt	|SX|j
|d	}|jd	kr|jSd
t	||j|fSdS(sTry to execute given command (array) and return its stdout.

    In case of failure, a textual error gets returned. This function forces
    LC_MESSAGES to C, to avoid translated output in bug reports.
    tCtLC_MESSAGEStstdouttstderrtstdint	close_fdstenvsError: is.Error: command %s failed with exit code %i: %sN(
RRtcopyt
subprocesstPopentPIPEtNoneRRJRtcommunicatet
returncodeR(RtinputRtkeep_localeRtspRRk((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyR>7s

cCsltjdkrg}nMtjdrtjddgdtjdtjdkrtjddd	ttjd
gdtjdtjdkrdddd
dd	ddg}ntjdrYtjddgdtjdtjdkrYtjddd	ttjdgdtjdtjdkrYdddd
dd	ddg}ndddg}|S(NitDISPLAYtwhichtkdesudoRRtpgreps-xs-ut	ksmservers	--desktops//usr/share/applications/apport-kde-mime.desktops--RtLANGUAGEs
LC_MESSAGES=Ctgksusgnome-panel|gconfd-2s-DtApporttsudos	LANGUAGE=(RtgetuidtgetenvRtcallRR(tprefix((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyt_root_command_prefixOs"	'	'!cCsAt|tgks$tdtt|||dtS(sTry to execute given command (array) as root and return its stdout.

    This passes the command through gksu, kdesudo, or sudo, depending on the
    running desktop environment.

    In case of failure, a textual error gets returned.
    scommand must be a listR(RtAssertionErrorR>RR(RRR((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytroot_command_outputds$c
Cs8tj}ztjj|d}t|d}x[|jD]M\}}t|dsgtd|j	d|tjj||fq@W|j
tjt
d|gdt}|jxX|D]P}ttjj||}|jj}	|	r|	||<n|j
qWWdtj|XdS(	sPExecute multiple commands as root and put their outputs into report.

    command_map is a keyname -> 'shell command' dictionary with the commands to
    run. They are all run through /bin/sh, so you need to take care of shell
    escaping yourself. To include stderr output of a command, end it with
    "2>&1".

    Just like root_command_output() this will use gksu, kdesudo, or sudo for
    gaining root privileges, depending on the running desktop environment.

    This is preferrable to using root_command_output() multiple times, as that
    will ask for the password every time.
    s:script:twRs(command must be a string (shell command)s%s | cat > %s
s/bin/shRN(ttempfiletmkdtempRRRRR!thasattrRtwritetcloseRRRRtwaitRRtshutiltrmtree(
Rtcommand_maptworkdirtscript_pathtscripttkeynameRRRtbuf((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_root_command_outputsps$*
	


cCs
td|S(scExtract recent messages from syslog which match a regex.

    pattern should be a "re" object.
    s/var/log/syslog(trecent_logfile(tpattern((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyt
recent_syslogsi'cCsd}ytjddt||gdtj}xF|jdkr{x-|jD]"}|j|rR||7}qRqRWq6W|jWnt	k
rdSX|S(sExtract recent messages from a logfile which match a regex.

    pattern should be a "re" object. By default this catches at most the last
    1000 lines, but this can be modified with a different maxlines argument.
    Rttails-nRN(
RRRRtpollRRtsearchRR=(tlogfileRtmaxlinestlinesRR((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyRs
cCs}tjjd}tjj|s(dS|s@tjd}nd}x0t|D]"}|j|rS||7}qSqSW|S(slExtract messages from ~/.xsession-errors.

    By default this parses out glib-style warnings, errors, criticals etc. and
    X window errors.  You can specify a "re" object as pattern to customize the
    filtering.

    Please note that you should avoid attaching the whole file to reports, as
    it can, and often does, contain sensitive and private data.
    s~/.xsession-errorsRs^(\(.*:\d+\): \w+-(WARNING|CRITICAL|ERROR))|(Error: .*No Symbols named)|([^ ]+\[\d+\]: ([A-Z]+):)|([^ ]-[A-Z]+ \*\*:)|(received an X Window System error)|(^The error was ')|(^  \(Details: serial \d+ error_code)(RRR}RRgtcompileRR(RRRR((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytxsession_errorss
iiiiiiiii	i
iic
GsR|stddgSd}tddg}x|jdD]}d}d}x|jdD]}y|jdd\}}Wntk
rq`nX|j}|j}|d	krt|d
d!d}	|	d
@d?}q`|dkr`|}q`q`W|r>|r>||kr>|r(|d7}n|tdd|gj7}q>q>W|S(s9Return a text dump of PCI devices attached to the system.RUs-vvnnRs-vvmmnns

s
t:itClassiiiiitSlots-vvnnsN(R>RRR2RR(
tpci_classestresulttoutputt	paragrapht	pci_classtslotRRROtn((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyR~s0


&cCstddgS(s9Return a text dump of USB devices attached to the system.RWs-v(R>(((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytusb_devicesscCsPtj|}|rFg|D]!}tjj||r|^q}n|}|S(sFRetrieve a list of files owned by package, optionally matching globpat(RR1Rtfnmatch(R(tglobpatR5RR((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytfiles_in_packages
1cCsdS(tObsoleteN((RR(((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_gconfsc	Cs|jdd}i}tjj}d|d<tjdd|gd|dtj}xi|jD]^}y+|jdd	\}}}|j
}Wntk
rqbnX||j|i|<qbWtjdd|gdtj}x|jD]}y+|jdd	\}}}|j
}Wntk
r6qnX||j|ij|dkr|d
|||f7}qqW||d<dS(s/Attach user-modified gsttings keys of a schema.tGsettingsChangesRs/nonexistingtXDG_CONFIG_HOMEt	gsettingsslist-recursivelyRRis	%s %s %s
N(
R<RRRRRRRRRtrstripR2t
setdefault(	Rtschemat	cur_valuetdefaultsRRRjRRO((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_gsettings_schema
s0


$cCsAx:t|dD])}tjj|d }t||qWdS(s@Attach user-modified gsettings keys of all schemas in a package.s)/usr/share/glib-2.0/schemas/*.gschema.xmliN(RRRRR(RR(tschema_fileR((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_gsettings_package-s	
cCstddg|d<tddg|d<tt|d<t|ddd	x1dD])}|tjkrVtj|||<qVqVWd
S(s5Attach generic network-related information to report.tiptroutetIpRoutetaddrtIpAddrt
PciNetworks/etc/network/interfacesRtIfupdownConfigt
http_proxyt	ftp_proxytno_proxyN(RRR(R>R~tPCI_NETWORKRRR(Rtvar((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_network5s
c
Csttjd|d<tjddtjddtjddtd	gjd
dd|d
<tddg|d<tdddg|d<t|ddddS(s5Attach wireless (WiFi) network information to report.sH(NetworkManager|modem-manager|dhclient|kernel|wpa_supplicant)(\[\d+\])?:t
WifiSyslogs
ESSID:(.*)sESSID:<hidden>sEncryption key:(.*)sEncryption key: <hidden>sAccess Point: (.*)sAccess Point: <hidden>tiwconfigsUTF-8R^tignoretIwConfigtrfkillR{tRfKilltiwtregR<tCRDAs/var/log/wpa_supplicant.logRtWpaSupplicantLogN(RRgRRhR>RR(R((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_wifiAs+c!Cst|ddt|ddtdg|d<tddg|d	<tjd
}|rtddd
g|}tjdd||d<ntdddddddddddddddd d!d"d#d$d%d&d'd(dd)d*d+d,d-d.d/ |d0<d1S(2skAttach printing information to the report.

    Based on http://wiki.ubuntu.com/PrintingBugInfoScript.
    s/etc/papersizet	Papersizes/var/log/cups/error_logtCupsErrorLogtlocaletLocaletlpstats-vtLpstats/etc/cups/ppd/*.ppdtfgreps-Hs	*NickNames*/etc/cups/ppd/(.*).ppd:\*NickName: *"(.*)"s\g<1>: \g<2>tPpdFilestfoo2zjssfoomatic-dbsfoomatic-db-enginesfoomatic-db-gutenprintsfoomatic-db-hpijssfoomatic-filterssfoomatic-guithpijsthpliptm2300wtmin12xxwtc2050thpojtpxljrtpnm2ppatsplixshp-ppds
hpijs-ppdsslinuxprinting.org-ppdssopenprinting-ppdssopenprinting-ppds-extratghostscripttcupsscups-driver-gutenprintt
ijsgutenprintscupsys-driver-gutenprintsgimp-gutenprintsgutenprint-docsgutenprint-localesssystem-config-printer-commontkdeprinttPrintingPackagesN(RR>RRgRhtpackage_versions(Rtppdst	nicknames((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_printingNs$					cCsMd}tj|tj}d}tj|tj}tjjdr^td||d<n(tjjdrtd||d<ntjjdrt|id|dd	6nt|d
dt|dd
tj	||j
ddstj	||j
d	drI|j
dd}|r8|d7}n|d|d<ndS(s0Attach MAC information and events to the report.s!audit\(|apparmor|selinux|securitysapparmor="DENIED"s/var/log/kern.logtKernLogs/var/log/messagess/var/run/auditd.pidsegrep "s" /var/log/audit/audit.logtAuditLogs/proc/version_signaturetProcVersionSignatures
/proc/cmdlinetProcCmdlineRtTagst tapparmorN(RgRt
IGNORECASERRRRRRRR<(Rt	mac_regextmac_retaa_denied_regextaa_denied_rettags((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_mac_eventshs"<
cCst||d<dS(siAttach version information for related packages

    In the future, this might also run their hooks.
    tRelatedPackageVersionsN(R (Rtpackages((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_related_packagesscGsg}x|D]}|sq
ntj|}|sJ|j|dfnxit|D][}ytj|}Wntk
rd}nX|dkrd}n|j||fqWWq
Wttgt	|D]}tt
|^q\}}d|}	djg|D]}
|	|
^qS(stReturn a text listing of package names and versions.

    Arguments may be package names or globs, e. g. "foo*"
    sN/As
%%-%ds %%ss
N(Rtpackage_name_globRtsortedtget_versionR2RtmaptmaxtziptlenR(R3tversionstpackage_patterntmatching_packagesR(Rttt
package_widtht
version_widthtfmttv((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyR s$


	7
cCst}xotd|gjdD]R}y|jdd\}}Wntk
r]q%nX|j}|j|q%W|S(ssReturns a list of strings containing the sonames of shared libraries
    with which the specified binary is linked.tldds
s=>i(tsetR>RR2Rtadd(RtlibsRtlibtrest((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytshared_librariess	"
cCsHt|}||krtSx%|D]}|j|dr#tSq#WtS(sReturns True if the binary at path links with the library named lib.

    path should be a fully qualified path (e.g. report['ExecutablePath'])
    lib may be of the form 'lib<name>' or 'lib<name>.so.<version>'
    s.so.(RJRR3R(RRHRGt
linked_lib((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytlinks_with_shared_librarys
cCsyWtjd|gdtjdtj}|jdjd}|jdkrVdSWntk
rkdSXx\|jD]N}|j	dd}t
|d	krqyn|dd
kry|djSqyWdS(s-Return the license for a given kernel module.s
/sbin/modinfoRRisUTF-8tinvalidRiitlicenseN(RRRRRRRJRt
splitlinesRR;R(tmoduletmodinfoRkRjR((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyt_get_module_licenses
s
/proc/modulescCsy<t|*}g|D]}|jd^q}WdQXWntk
rPgSXg}xa|D]Y}t|}|r^d|kpd|kpd|kpd|kr^|j|q^q^W|S(sCCheck loaded modules and return a list of those which are not free.iNtGPLtBSDtMPLtMIT(RRR=RRR(tmodule_listRRjtmodstnonfreetm((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytnonfree_kernel_moduless-

7cCsd}xtj|D]}tjj||}|dkstjj|rVqnt|jj}|dkr|jdd}n|dkrt	j
|}|d7}n|d||f7}qW|S(	NRRDtmodess
R)tedids-base64s%s: %s
(RRGRRRRRRR4tbase64t	b64encode(tconR\RRtval((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyt__drm_con_infos
cCsd}tjj|sdSxjtj|D]Y}tjj||}tjjtjj|dr,t||dt|<q,q,WdS(sWAdd information about DRM hardware.

    Collect information from /sys/class/drm/.
    s/sys/class/drmNtenabledsDRM.(RRRFRGRRRbR
(Rtdrm_dirRR`((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_drm_infos!c
Cstjtj}zLy3tjtjdtjtj|d}Wntk
r\dSXWdtjtj|Xyt	j
t	jjd}t	j
j|t	jjddddd}|j}t	j
j|t	jjdd|dd}|j}Wn1tjk
r0}tjjdt|dSXtjd	|}	|	rptjtj|	jd
d}ntjjd|dS||kS(
sCheck if the problem happened in the currently running XDG session.

    This can be used to determine if e. g. ~/.xsession-errors is relevant and
    should be attached.

    Return None if this cannot be determined due to not being able to talk to
    ConsoleKit.
    RtDateNsorg.freedesktop.ConsoleKits#/org/freedesktop/ConsoleKit/Managers"org.freedesktop.ConsoleKit.Managers"org.freedesktop.ConsoleKit.Sessions#Error connecting to ConsoleKit: %s
s+(\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d)(?:\.\d+Z)$is%Y-%m-%dT%H:%M:%Ss%cannot parse time returned by CK: %s
(Rt	getlocaletLC_TIMEt	setlocalettimetmktimetstrptimetKeyErrorRRtbus_get_synctBusTypetSYSTEMt	DBusProxytnew_synctDBusProxyFlagstNONEtGetCurrentSessiontGetCreationTimeRtGErrorRRRRRgtmatchtcalendarttimegmtgroup(
Rt
orig_ctimetreport_timetbust
ck_managertcur_sessiont
ck_sessiontsession_start_timeRRZ((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytin_session_of_problem
s8
 
			'cCsd}|st|}ntjj|rt|dN}g|jD]!}|jdsg|nd^qL}dj|||<WdQXndS(s;attach /etc/default/grub after filtering out password liness/etc/default/grubtrtpasswords### PASSWORD LINE REMOVED ###RN(R
RRRRt	readlinesR3R(RRRRRjtfiltered((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pytattach_default_grub:s1(Ot__doc__RRRRjRyR#RRgR%R^RRRt
gi.repositoryRRtapport.packaging_implRRR0t	maketransRtAttributeErrortstringR
RRRRRR/R8RBRPRlRRitSTDOUTRR>RRRRRRtPCI_MASS_STORAGERtPCI_DISPLAYRt
PCI_MEMORYt
PCI_BRIDGEtPCI_SIMPLE_COMMUNICATIONStPCI_BASE_SYSTEM_PERIPHERALStPCI_INPUT_DEVICEStPCI_DOCKING_STATIONStPCI_PROCESSORStPCI_SERIAL_BUSR~RRRRRRRR#R1R4R RJRLRRR[RbReRR(((s4/usr/lib/python2.7/dist-packages/apport/hookutils.pyt<module>s
	
					8	;	
		)		 	
		 			
										0