Skip to content

Commit

Permalink
Fix review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraham committed Jun 3, 2015
1 parent 6084bbf commit b24c241
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def get_parser():
help="Specific product to include in test run")
parser.add_argument("--pdb", action="store_true",
help="Invoke pdb on uncaught exception")
parser.add_argument("--tag", action="append",
parser.add_argument("--tag", action="append", dest="tags",
help="tags to select tests")
parser.add_argument("test", nargs="*",
help="Specific tests to include in test run")
Expand Down
6 changes: 4 additions & 2 deletions wptrunner/executors/executormarionette.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def wait(self):

def on_environment_change(self, old_environment, new_environment):
#Unset all the old prefs
for name, _ in old_environment.get("prefs", {}).iteritems():
for name in old_environment.get("prefs", {}).iterkeys():
value = self.executor.original_pref_values[name]
if value is None:
self.clear_user_pref(name)
Expand All @@ -151,11 +151,13 @@ def on_environment_change(self, old_environment, new_environment):
self.set_pref(name, value)

def set_pref(self, name, value):
if value not in ("true", "false"):
if value.lower() not in ("true", "false"):
try:
int(value)
except ValueError:
value = "'%s'" % value
else:
value = value.lower()

self.logger.info("Setting pref %s (%s)" % (name, value))

Expand Down

0 comments on commit b24c241

Please sign in to comment.