def clear_access_data(self): Ec2LikePlatform.clear_access_data(self) try: del os.environ['AWS_ACCESS_KEY_ID'] del os.environ['AWS_SECRET_ACCESS_KEY'] except KeyError: pass
def set_access_data(self, access_data): Ec2LikePlatform.set_access_data(self, access_data) key_id, key = self.get_access_keys() os.environ['AWS_ACCESS_KEY_ID'] = key_id os.environ['AWS_SECRET_ACCESS_KEY'] = key