Bug 1273288 - Fix issue with undefined proc variable when editor isn't possible draft
authorJonathan Kingston <jkingston@mozilla.com>
Tue, 07 Jun 2016 14:44:52 +0100
changeset 376213 d01f0d825fd74c6c453db0f3c62eaa693cf16e2a
parent 375957 1828937da9493b2cd54862b9c520b2ba5c7db92b
child 523097 1dde7c635687de982165059932a200bd167256a1
push id20518
push userjkingston@mozilla.com
push dateTue, 07 Jun 2016 14:43:18 +0000
bugs1273288
milestone50.0a1
Bug 1273288 - Fix issue with undefined proc variable when editor isn't possible MozReview-Commit-ID: JNoFf6Jt3aN
testing/web-platform/mach_commands.py
--- 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()