Bug 1276643 - Correct variables used in error logging. Formatting for pep8. r?maja_zf draft
authorBryce Van Dyk <bvandyk@mozilla.com>
Tue, 07 Jun 2016 15:13:20 +1200
changeset 376098 6d09f2eac31526d5f3cd627a1489e0139c446900
parent 375957 1828937da9493b2cd54862b9c520b2ba5c7db92b
child 523082 018a4f02bb289c0045cf5c1f4d3da35b76f05f20
push id20503
push userbvandyk@mozilla.com
push dateTue, 07 Jun 2016 12:01:20 +0000
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(