--copy paste error
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								c9bb105518
							
						
					
				
			
			
				commit
				
					
						bbef928a6d
					
				
			
		
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -114,9 +114,9 @@ class Remote(object):
 | 
			
		|||
        self.log.debug("Remote run: %s", command)
 | 
			
		||||
        try:
 | 
			
		||||
            if return_output:
 | 
			
		||||
                return subprocess.check_output(command, env=env).decode()
 | 
			
		||||
                return subprocess.check_output(command).decode()
 | 
			
		||||
            else:
 | 
			
		||||
                subprocess.check_call(command, env=env)
 | 
			
		||||
                subprocess.check_call(command)
 | 
			
		||||
        except subprocess.CalledProcessError:
 | 
			
		||||
            raise cdist.Error("Command failed: " + " ".join(command))
 | 
			
		||||
        except OSError as error:
 | 
			
		||||
| 
						 | 
				
			
			@ -144,9 +144,9 @@ class Remote(object):
 | 
			
		|||
        
 | 
			
		||||
        try:
 | 
			
		||||
            if return_output:
 | 
			
		||||
                return subprocess.check_output(command, env=env).decode()
 | 
			
		||||
                return subprocess.check_output(command).decode()
 | 
			
		||||
            else:
 | 
			
		||||
                subprocess.check_call(command, env=env)
 | 
			
		||||
                subprocess.check_call(command)
 | 
			
		||||
        except subprocess.CalledProcessError as error:
 | 
			
		||||
            script_content = self.run(["cat", script])
 | 
			
		||||
            self.log.error("Code that raised the error:\n%s", script_content)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue