Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: testing_support/fake_repos.py

Issue 23437029: Catching for "No such process" in tear_down_git (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/checkout_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing_support/fake_repos.py
===================================================================
--- testing_support/fake_repos.py (revision 222767)
+++ testing_support/fake_repos.py (working copy)
@@ -242,7 +242,7 @@
logging.debug('Killing svnserve pid %s' % self.svnserve.pid)
try:
self.svnserve.kill()
- except OSError, e:
+ except OSError as e:
if e.errno != errno.ESRCH: # no such process
raise
wait_for_port_to_free(self.host, self.svn_port)
@@ -267,7 +267,11 @@
pid = int(self.git_pid_file.read())
self.git_pid_file.close()
logging.debug('Killing git daemon pid %s' % pid)
- subprocess2.kill_pid(pid)
+ try:
+ subprocess2.kill_pid(pid)
+ except OSError as e:
+ if e.errno != errno.ESRCH: # no such process
+ raise
self.git_pid_file = None
wait_for_port_to_free(self.host, self.git_port)
self.git_port = None
« no previous file with comments | « no previous file | tests/checkout_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698