ethminer_supervisor/util.py
def parse_time(line):
    """ Parse systemd time format to python date """
    line_segments = line.split()
    if len(line_segments) > 3:
        try:
            line_date = b' '.join(line_segments[:3]).decode()
            parsed_time = datetime.strptime(line_date, "%b %d %H:%M:%S")
            parsed_time = parsed_time.replace(year=datetime.now().year)
            return parsed_time
        except ValueError:
            logger.debug('Line doesnt have a valid time, skipping')
    return None
 Parse systemd time format to python date 
Parse systemd time format to python date
Parse systemd time format to python date
def parse_time(line):
    line_segments = line.split()
    if len(line_segments) > 3:
        try:
            line_date = b' '.join(line_segments[:3]).decode()
            parsed_time = datetime.strptime(line_date, "%b %d %H:%M:%S")
            parsed_time = parsed_time.replace(year=datetime.now().year)
            return parsed_time
        except ValueError:
            logger.debug('Line doesnt have a valid time, skipping')
    return None
def parse_time ( line ) : line_segments = line . split ( ) if len ( line_segments ) > 3 : try : line_date = b' ' . join ( line_segments [ : 3 ] ) . decode ( ) parsed_time = datetime . strptime ( line_date , "%b %d %H:%M:%S" ) parsed_time = parsed_time . replace ( year = datetime . now ( ) . year ) return parsed_time except ValueError : logger . debug ( 'Line doesnt have a valid time, skipping' ) return None
Parse systemd time format to python date
Parse systemd time format to python date
""" Parse systemd time format to python date """
line