예제 #1
0
 def check_validdata(self,data_line):
     from pysqm.common import format_value
     try:
         assert(format_value(data_line)[0]!='#')
         assert(format_value(data_line)[0]!='')
     except:
         return(False)
     else:
         return(True)
예제 #2
0
    def extract_metadata(self,raw_data_and_metadata):
        from pysqm.common import format_value
        metadata_lines = [\
         line for line in raw_data_and_metadata \
         if format_value(line)[0]=='#']

        # Extract the serial number
        serial_number_line = [\
         line for line in metadata_lines \
         if 'SQM serial number:' in line][0]
        self.serial_number = format_value(serial_number_line.split(':')[-1])