Viewing File: /usr/lib/python2.7/site-packages/sos/plugins/unpackaged.pyc
ó
ŃKjc @ sK d d l m Z m Z d d l Z d d l Z d e e f d YZ d S( i˙˙˙˙( t Plugint RedHatPluginNt
Unpackagedc B s e Z d Z d Z RS( sR
Collects a list of files that are not handled by the package
manager
c
C sÚ d } d d } d } | j d t s4 d Sg } t d | j j | j j j D } x! | D] } | | | 7} qr Wg | D] } | | k r | ^ q } | | } | j d j | d d S( Nc S s t j d j d S( s3 Return a list of directories in $PATH.
t PATHt :( t ost environt split( ( ( s: /usr/lib/python2.7/site-packages/sos/plugins/unpackaged.pyt get_env_path_list s c S sC g } x6t j | d t D]\ } } } | rk x7 | D], } g | D] } | | k rE | ^ qE | (q8 Wn x | D] } t j j | | } yA x: t j t j | j rĚ t j j t j
| } q WWn t k
rä qr n X| j t j j
| qr Wx6 | D]. } | j t j j
t j j | | q Wq W| S( sŢ Retrun a list of all files present on the system, excluding
any directories listed in `exclude`.
:param path: the starting path
:param exclude: list of paths to exclude
t topdown( R t walkt Truet patht joint statt S_ISLNKt lstatt st_modet abspatht readlinkt Exceptiont appendt realpath( R t excludet file_listt roott dirst filest et dt name( ( s: /usr/lib/python2.7/site-packages/sos/plugins/unpackaged.pyt all_files_system s"