mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 10:26:10 +01:00 
			
		
		
		
	patman: Update errors and warnings to use stderr
When warnings and errors are produced by tools they should be written to stderr. Update the tout implementation to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
		| @@ -3232,7 +3232,7 @@ class TestFunctional(unittest.TestCase): | |||||||
|         with test_util.capture_sys_output() as (stdout, stderr): |         with test_util.capture_sys_output() as (stdout, stderr): | ||||||
|             control.ReplaceEntries(updated_fname, None, outdir, []) |             control.ReplaceEntries(updated_fname, None, outdir, []) | ||||||
|         self.assertIn("Skipping entry '/u-boot' from missing file", |         self.assertIn("Skipping entry '/u-boot' from missing file", | ||||||
|                       stdout.getvalue()) |                       stderr.getvalue()) | ||||||
|  |  | ||||||
|     def testReplaceCmdMap(self): |     def testReplaceCmdMap(self): | ||||||
|         """Test replacing a file fron an image on the command line""" |         """Test replacing a file fron an image on the command line""" | ||||||
|   | |||||||
| @@ -83,7 +83,10 @@ def _Output(level, msg, color=None): | |||||||
|         ClearProgress() |         ClearProgress() | ||||||
|         if color: |         if color: | ||||||
|             msg = _color.Color(color, msg) |             msg = _color.Color(color, msg) | ||||||
|         print(msg) |         if level < NOTICE: | ||||||
|  |             print(msg, file=sys.stderr) | ||||||
|  |         else: | ||||||
|  |             print(msg) | ||||||
|  |  | ||||||
| def DoOutput(level, msg): | def DoOutput(level, msg): | ||||||
|     """Output a message to the terminal. |     """Output a message to the terminal. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user