ó
½-'Nc           @   s:   d  d l  m Z d  d l m Z d e f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   succeed(   t   get_thermal_zonest   Temperaturec           B   s&   e  Z d d  „ Z d „  Z d „  Z RS(   c         C   s   | |  _  d  S(   N(   t   _thermal_zone_path(   t   selft   thermal_zone_path(    (    sA   /usr/lib/python2.7/dist-packages/landscape/sysinfo/temperature.pyt   __init__   s    c         C   s   | |  _  d  S(   N(   t   _sysinfo(   R   t   sysinfo(    (    sA   /usr/lib/python2.7/dist-packages/landscape/sysinfo/temperature.pyt   register   s    c         C   s‘   d  } d  } xV t |  j ƒ D]E } | j d  k	 r | d  k sL | j | k r | j } | j } q q W| d  k	 r‡ |  j j d | ƒ n  t d  ƒ S(   NR   (   t   NoneR   R   t   temperature_valuet   temperatureR   t
   add_headerR    (   R   R   t	   max_valuet   zone(    (    sA   /usr/lib/python2.7/dist-packages/landscape/sysinfo/temperature.pyt   run   s    	N(   t   __name__t
   __module__R
   R   R	   R   (    (    (    sA   /usr/lib/python2.7/dist-packages/landscape/sysinfo/temperature.pyR      s   	N(   t   twisted.internet.deferR    t   landscape.lib.sysstatsR   t   objectR   (    (    (    sA   /usr/lib/python2.7/dist-packages/landscape/sysinfo/temperature.pyt   <module>   s   