libkas: Properly format stderr dump of failing commands
Inject the linefeed that we removed in f0a18868c9 and add an
introduction line.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
			
			
This commit is contained in:
		
				
					committed by
					
						
						Daniel Wagner
					
				
			
			
				
	
			
			
			
						parent
						
							eda4129b54
						
					
				
				
					commit
					f58d44f190
				
			@@ -119,8 +119,10 @@ def run_cmd_async(cmd, cwd, env=None, fail=True, shell=False, liveupdate=True):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if ret and fail:
 | 
					    if ret and fail:
 | 
				
			||||||
        msg = 'Command "{cwd}$ {cmd}" failed'.format(cwd=cwd, cmd=cmdstr)
 | 
					        msg = 'Command "{cwd}$ {cmd}" failed'.format(cwd=cwd, cmd=cmdstr)
 | 
				
			||||||
        for line in logo.stderr:
 | 
					        if logo.stderr:
 | 
				
			||||||
            msg += line
 | 
					            msg += '\n--- Error summary ---\n'
 | 
				
			||||||
 | 
					            for line in logo.stderr:
 | 
				
			||||||
 | 
					                msg += line
 | 
				
			||||||
        logging.error(msg)
 | 
					        logging.error(msg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return (ret, ''.join(logo.stdout))
 | 
					    return (ret, ''.join(logo.stdout))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user