Bug 1273288 - Fix issue with undefined proc variable when editor isn't possible
MozReview-Commit-ID: JNoFf6Jt3aN
--- a/testing/web-platform/mach_commands.py
+++ b/testing/web-platform/mach_commands.py
@@ -218,25 +218,28 @@ testing/web-platform/tests for tests tha
editor = kwargs["editor"]
elif "VISUAL" in os.environ:
editor = os.environ["VISUAL"]
elif "EDITOR" in os.environ:
editor = os.environ["EDITOR"]
else:
editor = None
+ proc = None
if editor:
proc = subprocess.Popen("%s %s" % (editor, path), shell=True)
if not kwargs["no_run"]:
p = create_parser_wpt()
wpt_kwargs = vars(p.parse_args(["--manifest-update", path]))
context.commands.dispatch("web-platform-tests", context, **wpt_kwargs)
- proc.wait()
+ if proc:
+ proc.wait()
+
def create_parser_wpt():
from wptrunner import wptcommandline
return wptcommandline.create_parser(["firefox"])
def create_parser_update():
from update import updatecommandline
return updatecommandline.create_parser()