Bug 1465046 - Remove ProcessHandler.waitForFinish(). r=whimboo draft
authorAkshay Chiwhane <achiwhane@gmail.com>
Sun, 24 Jun 2018 14:06:29 -0400
changeset 811159 f6259dc5eb894eb4f1dd7aa372c3298ae2f74e68
parent 806474 874dedd55599e4b87fe37a497a968c079f1cca69
push id114212
push userbmo:achiwhane@gmail.com
push dateWed, 27 Jun 2018 02:30:20 +0000
reviewerswhimboo
bugs1465046
milestone62.0a1
Bug 1465046 - Remove ProcessHandler.waitForFinish(). r=whimboo MozReview-Commit-ID: JQnHZrLLDLv *** Bug 1465046 - Remove depricated function call in unit-nsinstall tests. r=whimboo MozReview-Commit-ID: DFAMmN8CFiH
config/tests/unit-nsinstall.py
testing/mozbase/mozprocess/mozprocess/processhandler.py
--- a/config/tests/unit-nsinstall.py
+++ b/config/tests/unit-nsinstall.py
@@ -163,17 +163,17 @@ class TestNsinstall(unittest.TestCase):
             testdir = self.mkdirs(u"\u4241\u1D04\u1414")
             # We don't use subprocess because it can't handle Unicode on
             # Windows <http://bugs.python.org/issue1759845>. mozprocess calls
             # CreateProcessW directly so it's perfect.
             p = processhandler.ProcessHandlerMixin([sys.executable,
                                                     NSINSTALL_PATH,
                                                     testfile, testdir])
             p.run()
-            rv = p.waitForFinish()
+            rv = p.wait()
 
             self.assertEqual(rv, 0)
             destfile = os.path.join(testdir, filename)
             self.assert_(os.path.isfile(destfile))
 
     # TODO: implement -R, -l, -L and test them!
 
 
--- a/testing/mozbase/mozprocess/mozprocess/processhandler.py
+++ b/testing/mozbase/mozprocess/mozprocess/processhandler.py
@@ -858,22 +858,16 @@ falling back to not using job objects fo
                 self.reader.thread.join(timeout=1)
                 count += 1
                 if timeout is not None and count > timeout:
                     return None
 
         self.returncode = self.proc.wait()
         return self.returncode
 
-    # TODO Remove this method when consumers have been fixed
-    def waitForFinish(self, timeout=None):
-        print("MOZPROCESS WARNING: ProcessHandler.waitForFinish() is deprecated, "
-              "use ProcessHandler.wait() instead", file=sys.stderr)
-        return self.wait(timeout=timeout)
-
     @property
     def pid(self):
         return self.proc.pid
 
     @staticmethod
     def pid_exists(pid):
         if pid < 0:
             return False