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

Unified Diff: third_party/typ/typ/host.py

Issue 664123005: Roll typ to v0.8.6 / re25b780b0b147580ef248c212b238446264d9d78 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « third_party/typ/typ/fakes/host_fake.py ('k') | third_party/typ/typ/runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/typ/typ/host.py
diff --git a/third_party/typ/typ/host.py b/third_party/typ/typ/host.py
index c5f6ac8c8d4c94f39bd8a10a1ed50534d2203866..fc9e11304cdb47f4baafac2b52a0753f901dc402 100644
--- a/third_party/typ/typ/host.py
+++ b/third_party/typ/typ/host.py
@@ -35,6 +35,7 @@ class Host(object):
python_interpreter = sys.executable
is_python3 = bool(sys.version_info.major == 3)
+ pathsep = os.pathsep
sep = os.sep
env = os.environ
@@ -77,6 +78,11 @@ class Host(object):
return proc.returncode, stdout.decode('utf-8'), stderr.decode('utf-8')
def call_inline(self, argv, env=None):
+ if isinstance(self.stdout, _TeedStream): # pragma: no cover
+ ret, out, err = self.call(argv, env)
+ self.print_(out, end='')
+ self.print_(err, end='', stream=self.stderr)
+ return ret
return subprocess.call(argv, stdin=self.stdin, stdout=self.stdout,
stderr=self.stderr, env=env)
@@ -126,6 +132,9 @@ class Host(object):
if not self.exists(path):
os.makedirs(path)
+ def mktempfile(self, delete=True):
+ return tempfile.NamedTemporaryFile(delete=delete)
+
def mkdtemp(self, **kwargs):
return tempfile.mkdtemp(**kwargs)
« no previous file with comments | « third_party/typ/typ/fakes/host_fake.py ('k') | third_party/typ/typ/runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698