D5631: hghave: let OSError with ENOENT through like any other
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Jan 25 15:02:17 EST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGfabb0224a599: hghave: let OSError with ENOENT through like any other (authored by martinvonz, committed by ).
CHANGED PRIOR TO COMMIT
https://phab.mercurial-scm.org/D5631?vs=13321&id=13453#toc
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5631?vs=13321&id=13453
REVISION DETAIL
https://phab.mercurial-scm.org/D5631
AFFECTED FILES
tests/hghave.py
CHANGE DETAILS
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -1,6 +1,5 @@
from __future__ import absolute_import
-import errno
import os
import re
import socket
@@ -118,13 +117,8 @@
is matched by the supplied regular expression.
"""
r = re.compile(regexp)
- try:
- p = subprocess.Popen(
- cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
- ret = -1
+ p = subprocess.Popen(
+ cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
s = p.communicate()[0]
ret = p.returncode
return (ignorestatus or not ret) and r.search(s)
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list