def record_exists(arg_dict):
    """Returns whether or not the given record exists. The record path
    is determined from the given path and dom_id in the arg_dict.
    """
    cmd = ["xenstore-exists", arg_dict % "/local/domain/%(dom_id)s/%(path)s"]
    try:
        _run_command(cmd)
        return True
    except XenstoreError, e:    # noqa
        if e.stderr == '':
            # if stderr was empty, this just means the path did not exist
            return False
        # otherwise there was a real problem
        raise
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py/record_exists/swapped operands of `%`