def restore_existing_iam_env_vars(self):
        """Restore backed up IAM environment variables."""
        for i in ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY',
                  'AWS_SESSION_TOKEN']:
            if 'OLD_' + i in self.env_vars:
                self.env_vars[i] = self.env_vars['OLD_' + i]
            elif i in self.env_vars:
                self.env_vars.pop(i)
def restore_existing_iam_env_vars ( self ) : for i in [ 'AWS_ACCESS_KEY_ID' , 'AWS_SECRET_ACCESS_KEY' , 'AWS_SESSION_TOKEN' ] : if 'OLD_' + i in self . env_vars : self . env_vars [ i ] = self . env_vars [ 'OLD_' + i ] elif i in self . env_vars : self . env_vars . pop ( i )
Restore backed up IAM environment variables.