Capture exit code from upgrade process, use it to indicate success/fail
This commit is contained in:
		
							parent
							
								
									0c52a5c70f
								
							
						
					
					
						commit
						3aad95ad9a
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -63,10 +63,11 @@ class UpgradeHandler(object):
 | 
			
		|||
        cmd = self.config.upgrade_command()
 | 
			
		||||
        with open(stdout_path, 'wb') as stdout:
 | 
			
		||||
            with open(stderr_path, 'wb') as stderr:
 | 
			
		||||
                subprocess.call(cmd, stdout=stdout, stderr=stderr)
 | 
			
		||||
                upgrade.exit_code = subprocess.call(cmd, stdout=stdout, stderr=stderr)
 | 
			
		||||
 | 
			
		||||
        after_path = self.config.upgrade_filepath(upgrade.uuid, filename='requirements.after.txt')
 | 
			
		||||
        self.record_requirements_snapshot(after_path)
 | 
			
		||||
        return upgrade.exit_code == 0
 | 
			
		||||
 | 
			
		||||
    def record_requirements_snapshot(self, path):
 | 
			
		||||
        pip = self.get_pip_path()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue