Bug 1276643 - Correct variables used in error logging. Formatting for pep8. r=maja_zf
authorBryce Van Dyk <bvandyk@mozilla.com>
Tue, 07 Jun 2016 15:13:20 +1200
changeset 300978 235d278e82a3426bc996b79f69f449398e9637d2
parent 300977 439fa181138b2140d5c54367374345ce872fb75f
child 300979 5c836acf3197c5f30be8832e9f822bfeb175dc24
push id19599
push usercbook@mozilla.com
push dateWed, 08 Jun 2016 10:16:21 +0000
treeherderfx-team@81f4cc3f6f4c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1276643
milestone50.0a1
Bug 1276643 - Correct variables used in error logging. Formatting for pep8. r=maja_zf MozReview-Commit-ID: 1VKUYwxOsQC
dom/media/test/external/external_media_harness/testcase.py
--- a/dom/media/test/external/external_media_harness/testcase.py
+++ b/dom/media/test/external/external_media_harness/testcase.py
@@ -263,20 +263,21 @@ class EMESetupMixin(object):
                 adobe_result = self.marionette.execute_async_script(
                     reset_adobe_gmp_script,
                     script_timeout=60000)
                 widevine_result = self.marionette.execute_async_script(
                     reset_widevine_gmp_script,
                     script_timeout=60000)
                 if not adobe_result == 'success':
                     raise VideoException(
-                        'ERROR: Resetting Adobe GMP failed % s' % result)
+                        'ERROR: Resetting Adobe GMP failed % s' % adobe_result)
                 if not widevine_result == 'success':
                     raise VideoException(
-                        'ERROR: Resetting Widevine GMP failed % s' % result)
+                        'ERROR: Resetting Widevine GMP failed % s'
+                        % widevine_result)
 
             EMESetupMixin.version_needs_reset = False
 
     def check_and_log_boolean_pref(self, pref_name, expected_value):
         with self.marionette.using_context('chrome'):
             pref_value = self.prefs.get_pref(pref_name)
 
             if pref_value is None:
@@ -306,42 +307,43 @@ class EMESetupMixin(object):
                     self.logger.info('Pref %s is not an integer' % pref_name)
                     return False
 
             return pref_value >= minimum_value
 
     def chceck_and_log_version_string_pref(self, pref_name, minimum_value='0'):
         """
         Compare a pref made up of integers separated by stops .s, with a
-        version string of the same format. The number of integers in each string
-        does not need to match. The comparison is done by converting each to an
-        integer array and comparing those. Both version strings must be made
-        up of only integers, or this method will raise an unhandled exception
-        of type ValueError when the conversion to int fails.
+        version string of the same format. The number of integers in each
+        string does not need to match. The comparison is done by converting
+        each to an integer array and comparing those. Both version strings
+        must be made up of only integers, or this method will raise an
+        unhandled exception of type ValueError when the conversion to int
+        fails.
         """
         with self.marionette.using_context('chrome'):
             pref_value = self.prefs.get_pref(pref_name)
 
             if pref_value is None:
                 self.logger.info('Pref %s has no value.' % pref_name)
                 return False
             else:
                 self.logger.info('Pref %s = %s' % (pref_name, pref_value))
 
                 match = re.search('^\d(.\d+)*$', pref_value)
                 if not match:
-                    self.logger.info('Pref %s is not a version string' % pref_name)
+                    self.logger.info('Pref %s is not a version string'
+                                     % pref_name)
                     return False
 
             pref_ints = [int(n) for n in pref_value.split('.')]
             minumum_ints = [int(n) for n in minimum_value.split('.')]
 
             return pref_ints >= minumum_ints
 
-
     def check_eme_prefs(self):
         with self.marionette.using_context('chrome'):
             return all([
                 self.check_and_log_boolean_pref(
                     'media.mediasource.enabled', True),
                 self.check_and_log_boolean_pref(
                     'media.eme.enabled', True),
                 self.check_and_log_boolean_pref(