Information System : Linux apprendre2 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Disable Function : NONE
oB]c @ s. d Z d d l Z e j e Z d Z d S( s9 Common utility functions for interacting with subprocess.iNc C s) g } g } g } x | D] } t | t rq | d d k rK | d } q | d | k r | j d | q nK t | t r | j d | s | j | q n | j t | q | j | q W| r t j d | | d j | n | r%t
d j d | d d j | n | S(
s Ensure user-provided commands start with base_command; warn otherwise.
Each command is either a list or string. Perform the following:
- If the command is a list, pop the first element if it is None
- If the command is a list, insert base_command as the first element if
not present.
- When the command is a string not starting with 'base-command', warn.
Allow flexibility to provide non-base-command environment/config setup if
needed.
@commands: List of commands. Each command element is a list or string.
@return: List of 'fixed up' commands.
@raise: TypeError on invalid config item type.
i i s %s s Non-%s commands in %s config:
%ss
sH Invalid {name} config. These commands are not a string or list:
{errors}t namet errorsN( t
isinstancet listt Nonet insertt strt
startswitht appendt LOGt warningt joint TypeErrort format( t base_commandt commandst warningsR t fixed_commandst command( ( s2 /usr/lib/python2.7/site-packages/cloudinit/subp.pyt prepend_base_command s0
( t __doc__t loggingt getLoggert __name__R R ( ( ( s2 /usr/lib/python2.7/site-packages/cloudinit/subp.pyt s