%PDF- %PDF-
| Direktori : /proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/salt/modules/ |
| Current File : //proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/salt/modules/system_profiler.pyc |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l m
Z
d Z d � Z d � Z
d � Z d � Z d S(
u�
System Profiler Module
Interface with macOS's command-line System Profiler utility to get
information about package receipts and installed applications.
.. versionadded:: 2015.5.0
i ( t absolute_importt unicode_literalst print_functionN( t sixu /usr/sbin/system_profilerc C@ s) t j j j d � } | r t St d f S( uA
Check to see if the system_profiler binary is available
u system_profileruS The system_profiler execution module cannot be loaded: system_profiler unavailable.( t saltt utilst patht whicht Truet False( t PROFILER_BINARY( ( s@ /usr/lib/python2.7/site-packages/salt/modules/system_profiler.pyt __virtual__ s c C@ s� t j t d d d | g d t j �} | j d d � \ } } t j rZ t j | � } n t j
| � } y | d d } Wn t t f k
r� g } n X| S( ub
Call out to system_profiler. Return a dictionary
of the stuff we are interested in.
u -detailLevelu fullu -xmlt stdoutt inputi u _itemsN(
t
subprocesst PopenR
t PIPEt communicatet NoneR t PY2t plistlibt readPlistFromStringt readPlistFromBytest
IndexErrort KeyError( t datatypet pt sysprofresultst sysprof_stderrt plistt apps( ( s@ /usr/lib/python2.7/site-packages/salt/modules/system_profiler.pyt _call_system_profiler"