def flags(d):
    """
    Basically converts a dict into name=value string, but only if the
    key is all-uppercase. This is because of the way we re-map keyword
    args for the circuit listeners, etcetra.
    """
    r = ''
    for k, v in d.items():
        if k.upper() == k:
            r += '%s=%s ' % (k, v)
    return r
