weather/stations/davis.py
def _get_new_archive_fields(self):
        '''
        returns a dictionary of fields from the newest archive record in the
        device. return None when no records are new.
        '''
        for i in xrange(3):
            records = self._dmpaft_cmd(self._archive_time)
            if records is not None: break
            time.sleep(1)

        if records is None:
            raise NoDeviceException('Can not access weather station')

        # find the newest record
        new_rec = None
        for r in records:
            new_time = (r['DateStamp'], r['TimeStamp'])
            if self._archive_time < new_time:
                self._archive_time = new_time
                new_rec = r

        return new_rec
def _get_new_archive_fields(self):
        '''
        returns a dictionary of fields from the newest archive record in the
        device. return None when no records are new.
        '''
        for i in xrange(3):
            records = self._dmpaft_cmd(self._archive_time)
            if records is not None: break
            time.sleep(1)

        if records is None:
            raise NoDeviceException('Can not access weather station')

        # find the newest record
        new_rec = None
        for r in records:
            new_time = (r['DateStamp'], r['TimeStamp'])
            if self._archive_time < new_time:
                self._archive_time = new_time
                new_rec = r

        return new_rec
returns a dictionary of fields from the newest archive record in the
        device. return None when no records are new.