mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-26 20:56:33 +00:00
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> (cherry picked from commit 83f82bd67a2f2e389584586a7016b3e7f85cff37) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
17e2e102dc
commit
6bdad8417d
@ -1,7 +1,9 @@
|
|||||||
|
from __future__ import print_function
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import glob
|
import glob
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
#
|
#
|
||||||
# Patch parsing functions
|
# Patch parsing functions
|
||||||
@ -167,13 +169,15 @@ def parse_developers(basepath=None):
|
|||||||
continue
|
continue
|
||||||
elif line.startswith("N:"):
|
elif line.startswith("N:"):
|
||||||
if name is not None or len(files) != 0:
|
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()
|
name = line[2:].strip()
|
||||||
elif line.startswith("F:"):
|
elif line.startswith("F:"):
|
||||||
fname = line[2:].strip()
|
fname = line[2:].strip()
|
||||||
dev_files = glob.glob(os.path.join(basepath, fname))
|
dev_files = glob.glob(os.path.join(basepath, fname))
|
||||||
if len(dev_files) == 0:
|
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
|
files += dev_files
|
||||||
elif line == "":
|
elif line == "":
|
||||||
if not name:
|
if not name:
|
||||||
@ -182,7 +186,8 @@ def parse_developers(basepath=None):
|
|||||||
files = []
|
files = []
|
||||||
name = None
|
name = None
|
||||||
else:
|
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
|
return None
|
||||||
linen += 1
|
linen += 1
|
||||||
# handle last developer
|
# handle last developer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user