def command(name, command):
    initd_file = name % "/etc/init.d/%s"
    upstart_file = "/etc/init/%s.conf" % name

    if file.exists(upstart_file):
        cmd = "%s %s" % (command, name)
    elif file.exists(initd_file):
        cmd = "%s %s" % (initd_file, command)
    else:
        cmd = "false"

    with ctx.unpatched_state():
        core.sudo(cmd)
dataset/ETHPy150Open michaelcontento/revolver/revolver/service.py/command/swapped operands of `%`