Exemplo n.º 1
0
 def understands_refusal(self, raw_crash):
     try:
         return normalize(raw_crash['Version']) >= normalize(
             self.config.minimal_version_for_understanding_refusal[
                 raw_crash['ProductName']])
     except KeyError:
         return False
Exemplo n.º 2
0
 def _predicate(self, raw_crash, processed_crash, processor):
     try:
         return (raw_crash.ProductName == 'Firefox' and
                 normalize(raw_crash.Version) < self.out_of_date_threshold)
     except AttributeError:
         self.out_of_date_threshold = normalize(
             processor.config.firefox_out_of_date_version)
         return self._predicate(raw_crash, processed_crash, processor)
Exemplo n.º 3
0
 def understands_refusal(self, raw_crash):
     try:
         return normalize(raw_crash['Version']) >= normalize(
             self.config.minimal_version_for_understanding_refusal[
               raw_crash['ProductName']
             ])
     except KeyError:
         return False
Exemplo n.º 4
0
 def understandsRefusal(self, raw_crash):
     try:
         return (vtl.normalize(raw_crash['Version']) >= vtl.normalize(
             self.config.minimalVersionForUnderstandingRefusal[
                 raw_crash['ProductName']
             ])
                 )
     except KeyError:
         return False
Exemplo n.º 5
0
 def _predicate(self, raw_crash, processed_crash, processor):
     try:
         return (
             raw_crash.ProductName == 'Firefox'
             and normalize(raw_crash.Version) < self.out_of_date_threshold
         )
     except AttributeError:
         self.out_of_date_threshold = normalize(
             processor.config.firefox_out_of_date_version
         )
         return self._predicate(raw_crash, processed_crash, processor)
Exemplo n.º 6
0
 def _action(self, raw_crash, processed_crash, processor):
     crashed_version = normalize(raw_crash.Version)
     if "Win" in processed_crash["json_dump"]["system_info"]['os']:
         return self._windows_action(raw_crash, processed_crash, processor)
     elif processed_crash["json_dump"]["system_info"]['os'] == "Mac OS X":
         return self._osx_action(raw_crash, processed_crash, processor)
     else:
         return self._add_classification(processed_crash,
                                         'update-firefox-latest-version',
                                         None, processor.config.logger)
Exemplo n.º 7
0
 def _action(self, raw_crash, processed_crash, processor):
     crashed_version = normalize(raw_crash.Version)
     if "Win" in processed_crash["json_dump"]["system_info"]['os']:
         return self._windows_action(raw_crash, processed_crash, processor)
     elif processed_crash["json_dump"]["system_info"]['os'] == "Mac OS X":
         return self._osx_action(raw_crash, processed_crash, processor)
     else:
         return self._add_classification(
             processed_crash,
             'update-firefox-latest-version',
             None,
             processor.config.logger
         )
Exemplo n.º 8
0
def test_normalize():
    for ver, expected, ver2 in tests:
        got = vtl.normalize(ver)
        assert got == expected, "expected %s, but got %s" % (expected, got)
Exemplo n.º 9
0
def test_normalize(ver, expected):
    assert ver_tools.normalize(ver) == expected
Exemplo n.º 10
0
 def understandsRefusal (self, jsonData):
   try:
     return vtl.normalize(jsonData['Version']) >= vtl.normalize(self.config.minimalVersionForUnderstandingRefusal[jsonData['ProductName']])
   except KeyError:
     return False
Exemplo n.º 11
0
def testNormalize():
    for ver, expected, ver2 in tests:
        got = vtl.normalize(ver)
        assert got == expected, "expected %s, but got %s" % (expected, got)
Exemplo n.º 12
0
def test_normalize(ver, expected):
    assert ver_tools.normalize(ver) == expected