+
    j                     `    ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RItR t ! R R4      t	R# )    Nc                 l    \         P                  f   \        4       \         n        \         P                  # )z'Return a singleton _Telemetry instance.)
_Telemetry
_telemetry     7/usr/lib/python3/dist-packages/DistUpgrade/telemetry.pygetr	   !   s$    $ *
   r   c                   H   a  ] tR t^(t o RtR tR tR tR tR t	R t
RtV tR# )	r   Nc                   / V n         / V n        V P                  4       V n        \        P
                  ! 4       P                  R 4      V P                   R&   V P                  R4       RV n        RV n	         \        R4      ;_uu_ 4       pVP                  4       V P                   R&   RRR4       R#   + '       g   i     R# ; i  \         d     R# i ; i)
VERSION_IDFromstartz/var/log/upgrade/telemetryubuntu_release_upgraderz/var/log/installer/media-infoInstallMediaN)_metrics_stages_hist_get_current_uptime_start_timeplatformfreedesktop_os_releaser	   	add_stage
_dest_path_sourceopenreadlineFileNotFoundError)selffs   & r   __init___Telemetry.__init__,   s    335 ( ? ? A E E!
f 	w60	566!01

n- 7666  		s0   5C B0&C 0C	;C C CCc                \   Rp \        R4      ;_uu_ 4       p\        VP                  4       P                  4       ^ ,          4      pRRR4       V#   + '       g   i     T# ; i  \        \
        \        3 d2   p\        P                  ! R\        T4      ,           4        Rp?T# Rp?ii ; i)z6Get current uptime info. None if we couldn't fetch it.Nz/proc/uptimez)Exception while fetching current uptime: )
r   floatreadsplitr   OSError
ValueErrorloggingwarningstr)r   uptimer   es   &   r   r   _Telemetry._get_current_uptime<   s    	$n%%qvvx~~/23 &
  &%
  "7J7 	$OOGF# $ $	$s4   A$ /AA$ A!	A$ !A$ $B+:&B&&B+c                    V P                  4       pV P                  e   Vf   R# WP                  \        W P                  ,
          4      &   R# )z(Record installer stage with current timeN)r   r   r   int)r   
stage_namenows   && r   r   _Telemetry.add_stageG   s?    &&(#s{9C#c$4$4456r   c                "    WP                   R&   R# )zRecord updater typeTypeNr   )r   updater_types   &&r   set_updater_type_Telemetry.set_updater_typeN   s     ,fr   c                "    WP                   R&   R# )z*Record if the user had third party sourcesThirdPartySourcesNr4   )r   usings   &&r   set_using_third_party_sources(_Telemetry.set_using_third_party_sourcesR   s    -2)*r   c           
     
   V P                   V P                  R&   \        P                  P	                  V P
                  4      p \        P                  P                  V4      '       g   \        P                  ! V4       \        V P
                  R4      ;_uu_ 4       p\        P                  ! V P                  V4       RRR4       \        P                  ! V P
                  \        P                  \        P                  ,          \        P                  ,          \        P                   ,          4       \*        P,                  ! R4      '       g   \$        P.                  ! R4       R#  \0        P2                  ! 4        Uu. uFZ  pTP4                  R8  g   K  \        P                  P7                  TP8                  R,           4      '       g   KN  TP:                  NK\  	  ppT'       g   \$        P&                  ! R
4       R# T EF  p\        P>                  PA                  4       p\0        PB                  ! T4      P8                  TR&   R\0        PB                  ! T4      P4                   2TR&    \D        PF                  ! RRT PH                  .TT\D        PJ                  \D        PJ                  R7      pTPL                  ^ 8w  d    \D        PF                  ! RR.RTTR7      pTPL                  ^ 8w  d   K  TPN                  PQ                  R4      PS                  4       PU                  4       p	T	PW                  R4      p
 \D        PF                  ! RRT PH                  R\)        T
4      PU                  4       .TT\D        PJ                  R7        \D        PF                  ! RRT PH                  T P
                  .TT\D        PJ                  R7       EK  	  R#   + '       g   i     EL; i  \"         d2   p\$        P&                  ! R\)        T4      ,           4        Rp?R# Rp?ii ; iu upi   \<         d2   p\$        P&                  ! R	\)        T4      ,           4        Rp?R# Rp?ii ; i  \<         d6   p\$        P&                  ! RT PH                   RT RT 24        Rp?EK  Rp?ii ; i  \<         d)   p\$        P&                  ! RT RT 24        Rp?EK  Rp?ii ; i  \<         d5   p\$        P&                  ! RT PH                   RT RT 24        Rp?ELRp?ii ; i  \<         d)   p\$        P&                  ! RT RT 24        Rp?EKP  Rp?ii ; i)z4Close telemetry collection

Save to destination fileStageswNz(Exception while storing telemetry data: zubuntu-insightsz2ubuntu-insights not available, skipping collectioni  z/.config/ubuntu-insightsz"Exception while retrieving users: z,No regular users with home directories foundHOMEz
/run/user/XDG_RUNTIME_DIRconsent)userenvstdoutstderrzException while checking z' consent with ubuntu-insights for user z: T)capture_outputrC   rD   zGException while checking default consent with ubuntu-insights for user zutf-8truez-s)rC   rD   rE   zException while setting collectz9Exception while collecting with ubuntu-insights for user ),r   r   ospathdirnamer   existsmakedirsr   jsondumpchmodstatS_IRUSRS_IWUSRS_IRGRPS_IROTHr%   r'   r(   r)   shutilwhichinfopwdgetpwallpw_uidisdirpw_dirpw_name	Exceptionenvironcopygetpwnam
subprocessrunr   DEVNULL
returncoderE   decodestriplowerendswith)r   
target_dirr   r+   uusersrC   rD   resultconsent_strrB   s   &          r   done_Telemetry.doneV   sA   
 #'"3"3hWW__T__5
	77>>*--J'doos++q		$--+ ,HHT__\\DLL0\\"$(LL12 ||-..LLMN		 'A88t#  GGMM!((-G"GH 		'   OOJKD**//#C,,t,33CK'1#,,t2D2K2K1L%MC!"#&	4<<@%--%--"   A%'^^*I6'+!	F $$) %mm227;AACIIK%..v6NN-% LL L..0 ")11&)!	 %--
 
E ; ,++
  	OOFF# $	  	OO@3q6IJ	,  /~ >559F"QCA " ! OO99=bE 6 ! OO24<<. A99=bE &    $vRs, s   $O) )4O) "O?A6O) *P- P(3P(P(!P- 1AQ,R/?AS%A T'O&	 	O) )P%4&P  P%(P- -Q)8&Q$$Q),R,7)R''R,/S":SS"%T$0)TT$'U2UU)r   r   r   r   r   )__name__
__module____qualname____firstlineno__r   r   r   r   r6   r;   rq   __static_attributes____classdictcell__)__classdict__s   @r   r   r   (   s0     J 	D-3y yr   r   )
rO   r'   rJ   r   rZ   rW   rR   rd   r	   r   r   r   r   <module>rz      s0   .   	  
   !g gr   