

def create_keypair(conn):
    keypair = conn.compute.find_keypair(KEYPAIR_NAME)
    if (not keypair):
        print('Create Key Pair:')
        keypair = conn.compute.create_keypair(name=KEYPAIR_NAME)
        print(keypair)
        try:
            os.mkdir(SSH_DIR)
        except OSError as e:
            if (e.errno != errno.EEXIST):
                raise f
        with open(PRIVATE_KEYPAIR_FILE, 'w') as f:
            f.write(('%s' % keypair.private_key))
        os.chmod(PRIVATE_KEYPAIR_FILE, 256)
    return keypair

dataset/ETHPy150Open openstack/python-openstacksdk/examples/compute/create.py create_keypair/VarMisuse@85/117 `e`->`f`