aboutsummaryrefslogtreecommitdiff
path: root/utils/getdeveloperlib.py
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <peter@korsgaard.com>2019-04-04 08:58:12 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-04-04 22:54:53 +0200
commit83f82bd67a2f2e389584586a7016b3e7f85cff37 (patch)
treef071807c279d78f0b3e737975548a412a253d32a /utils/getdeveloperlib.py
parentf63a58c35018d55bb56900922bd81369e214e4a6 (diff)
downloadbuildroot-83f82bd67a2f2e389584586a7016b3e7f85cff37.tar.gz
buildroot-83f82bd67a2f2e389584586a7016b3e7f85cff37.tar.bz2
utils/getdeveloperlib.py: print warnings/errors to stderr
Instead of stdout where it gets mixed with the normal output, confusing software parsing the output (E.G. get-developers -e as git sendemail.ccCmd). Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'utils/getdeveloperlib.py')
-rw-r--r--utils/getdeveloperlib.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/utils/getdeveloperlib.py b/utils/getdeveloperlib.py
index 2c8d477583..35c618f791 100644
--- a/utils/getdeveloperlib.py
+++ b/utils/getdeveloperlib.py
@@ -1,7 +1,9 @@
+from __future__ import print_function
import os
import re
import glob
import subprocess
+import sys
#
# Patch parsing functions
@@ -167,13 +169,15 @@ def parse_developers(basepath=None):
continue
elif line.startswith("N:"):
if name is not None or len(files) != 0:
- print("Syntax error in DEVELOPERS file, line %d" % linen)
+ print("Syntax error in DEVELOPERS file, line %d" % linen,
+ file=sys.stderr)
name = line[2:].strip()
elif line.startswith("F:"):
fname = line[2:].strip()
dev_files = glob.glob(os.path.join(basepath, fname))
if len(dev_files) == 0:
- print("WARNING: '%s' doesn't match any file" % fname)
+ print("WARNING: '%s' doesn't match any file" % fname,
+ file=sys.stderr)
files += dev_files
elif line == "":
if not name:
@@ -182,7 +186,8 @@ def parse_developers(basepath=None):
files = []
name = None
else:
- print("Syntax error in DEVELOPERS file, line %d: '%s'" % (linen, line))
+ print("Syntax error in DEVELOPERS file, line %d: '%s'" % (linen, line),
+ file=sys.stderr)
return None
linen += 1
# handle last developer