예제 #1
0
파일: analyze.py 프로젝트: satra/NiPypeold
 def diagnose_binaryblock(klass, binaryblock, endianness=None):
     ''' Run checks over header binary data, return string '''
     hdr = klass(binaryblock, endianness=endianness, check=False)
     battrun = BatteryRunner(klass._get_checks())
     reports = battrun.check_only(hdr)
     return '\n'.join([report.message
                       for report in reports if report.message])
예제 #2
0
파일: analyze.py 프로젝트: satra/NiPypeold
 def check_fix(self,
           logger=imageglobals.logger,
           error_level=imageglobals.error_level):
     ''' Check header data with checks '''
     battrun = BatteryRunner(self.__class__._get_checks())
     self, reports = battrun.check_fix(self)
     for report in reports:
         report.log_raise(logger, error_level)