also export __target_host to check_call
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								6ec4cefe09
							
						
					
				
			
			
				commit
				
					
						c29c419f61
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -128,7 +128,7 @@ class Remote(object): | ||||||
|             if return_output: |             if return_output: | ||||||
|                 return subprocess.check_output(command, env=os_environ).decode() |                 return subprocess.check_output(command, env=os_environ).decode() | ||||||
|             else: |             else: | ||||||
|                 subprocess.check_call(command) |                 subprocess.check_call(command, env=os_environ) | ||||||
|         except subprocess.CalledProcessError: |         except subprocess.CalledProcessError: | ||||||
|             raise cdist.Error("Command failed: " + " ".join(command)) |             raise cdist.Error("Command failed: " + " ".join(command)) | ||||||
|         except OSError as error: |         except OSError as error: | ||||||
|  | @ -164,7 +164,7 @@ class Remote(object): | ||||||
|             if return_output: |             if return_output: | ||||||
|                 return subprocess.check_output(command, env=os_environ).decode() |                 return subprocess.check_output(command, env=os_environ).decode() | ||||||
|             else: |             else: | ||||||
|                 subprocess.check_call(command) |                 subprocess.check_call(command, env=os_environ) | ||||||
|         except subprocess.CalledProcessError as error: |         except subprocess.CalledProcessError as error: | ||||||
|             script_content = self.run(["cat", script], return_output=True) |             script_content = self.run(["cat", script], return_output=True) | ||||||
|             self.log.error("Code that raised the error:\n%s", script_content) |             self.log.error("Code that raised the error:\n%s", script_content) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue