Blame icu_sources_data-Write-command-output-to-our-stderr.patch

245ca95
From: Simon McVittie <smcv@debian.org>
245ca95
Date: Mon, 9 Oct 2017 09:23:14 +0100
245ca95
Subject: icu_sources_data: Write command output to our stderr
245ca95
245ca95
Saying "See output in /tmp/foobar" is all very well for a developer
245ca95
build, but on a buildd our /tmp is going to get thrown away after
245ca95
the build. Just log the usual way instead.
245ca95
---
245ca95
 intl/icu_sources_data.py | 7 ++-----
245ca95
 1 file changed, 2 insertions(+), 5 deletions(-)
245ca95
245ca95
diff --git a/intl/icu_sources_data.py b/intl/icu_sources_data.py
245ca95
index 8cf9290..7d2d983 100644
245ca95
--- a/intl/icu_sources_data.py
245ca95
+++ b/intl/icu_sources_data.py
e29ba1b
@@ -187,16 +187,13 @@
245ca95
245ca95
 def try_run(name, command, cwd=None, **kwargs):
245ca95
     try:
245ca95
-        with tempfile.NamedTemporaryFile(prefix=name, delete=False) as f:
245ca95
-            subprocess.check_call(command, cwd=cwd, stdout=f,
245ca95
-                                  stderr=subprocess.STDOUT, **kwargs)
245ca95
+        subprocess.check_call(command, cwd=cwd, stdout=sys.stderr,
e29ba1b
+                                stderr=subprocess.STDOUT, **kwargs)
245ca95
     except subprocess.CalledProcessError:
245ca95
-        print('''Error running "{}" in directory {}
245ca95
-    See output in {}'''.format(' '.join(command), cwd, f.name),
245ca95
-              file=sys.stderr)
245ca95
+        print('''Error running "{}" in directory {}'''.format(' '.join(command), cwd),
e29ba1b
+            file=sys.stderr)
245ca95
         return False
245ca95
     else:
e29ba1b
-        os.unlink(f.name)
e29ba1b
         return True