+
    h(	  c                   sR    ^ RI t  ! R R]4      tR tR tR tR tR tRR	 ltR
 t	R# )    Nc                   s&   a  ] tR t^t o R tRtV tR# )DevErrorc                s@    \         P                  V R V,          4       R# )zprogramming error: %sN)RuntimeError__init__)ZselfZmsgs   &&+/usr/share/virt-manager/virtinst/xmlutil.pyr   ZDevError.__init__   s    d$;c$AB     N)Z__name__Z
__module__Z__qualname__Z__firstlineno__r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s     C Cr   r   c                 sD    V f   . # \        V \        4      '       g   V .# V # )N)Z
isinstanceZlist)Zlst   &r   listifyr      s%    
{	T""u
r   c                s    V '       d[   V P                  RR4      p V P                  RR4      p V P                  RR4      p V P                  RR4      p V P                  R	R
4      p V # )z5
Replaces chars ' " < > & with xml safe counterparts
Z&z&amp;Z'z&apos;Z"z&quot;Z<z&lt;Z>z&gt;)Zreplace)xmlr   r   
xml_escaper
      s\     kk#w'kk#x(kk#x(kk#v&kk#v&Jr   c                sz    T pVP                  R4      pVRR  F  p\        W$4      pK  	  \        W#R,          4      # )zReturn value of attribute identified by `prop_path`

Look up the attribute of `obj` identified by `prop_path`
(separated by "."). If any component along the path is missing an
`AttributeError` is raised.

.N)splitgetattr)obj	prop_pathparentpiecespieces   &&   r   get_prop_pathr   &   sB     F__S!F'  6":&&r   c                s|    T pVP                  R4      pVRR  F  p\        W54      pK  	  \        W4R,          V4      # )zSet value of attribute identified by `prop_path`

Set the attribute of `obj` identified by `prop_path` (separated by
".") to `value`. If any component along the path is missing an
`AttributeError` is raised.
r   Nr   )r   r   Zsetattr)r   r   Zvaluer   r   r   s   &&&   r   set_prop_pathr   6   sD     F__S!F'  6":u--r   c                  s(    R \         P                  9   # )ZVIRTINST_TEST_SUITE)osZenvironr   r   r   in_testsuiter   E   s     BJJ..r   c                 s    ^ RI pVP                  V P                  ^4      VP                  ^4      W#R7      pRP                  V4      # )r    N)fromfiletofile )difflibZunified_diff
splitlinesZjoin)ZorigstrZnewstrr   r   r   Zdlists   &&&&  r   diffr   I   sG      1v003h ! E 775>r   c                 s   ^ RI pV P                  4       pV'       g   V # Rp^ pV^ ,           F  pVR8w  d    MV^,          pK  	  V F<  pVP                  RVR,          ,          V4      '       d   WdR pW6R,           ,          pK>  	  V# )r    Nr   Z z	^%s *<.*$Z
)rer   Zmatch)r	   r   ZlinesZretZunindentZcZlines   &      r   unindent_device_xmlr   R   s    NNE

CH1XX8A 
 88LHsN3T::	?Dd{  Jr   )ZOriginalZNew)
r   r   r   r   r
   r   r   r   r   r   r   r   r   <module>r       s;    
C| C

' ./r   