Cleanup whitespace issues

This commit is contained in:
Ingo Ruhnke 2019-11-24 18:40:04 +01:00
parent 7c71045d19
commit f8fa7e55e5

View file

@ -37,23 +37,23 @@ group.add_option("-S", "--status",
help="print controller status") help="print controller status")
group.add_option("-s", "--slot", metavar="SLOT", type="int", group.add_option("-s", "--slot", metavar="SLOT", type="int",
dest="slot", dest="slot",
help="use slot SLOT for actions") help="use slot SLOT for actions")
group.add_option("-l", "--led", metavar="NUM", type="int", group.add_option("-l", "--led", metavar="NUM", type="int",
dest="led", dest="led",
help="set LED") help="set LED")
group.add_option("-r", "--rumble", metavar="L:R", group.add_option("-r", "--rumble", metavar="L:R",
dest="rumble", dest="rumble",
help="print controller status") help="print controller status")
group.add_option("-c", "--config", metavar="NUM", type="int", group.add_option("-c", "--config", metavar="NUM", type="int",
dest="config", dest="config",
help="switches to controller configuration NUM") help="switches to controller configuration NUM")
group.add_option("--shutdown", action="store_true", group.add_option("--shutdown", action="store_true",
dest="shutdown", dest="shutdown",
help="shuts down the daemon") help="shuts down the daemon")
parser.add_option_group(group) parser.add_option_group(group)
@ -69,7 +69,7 @@ elif options.bus == "auto":
try: try:
bus.get_object("org.seul.Xboxdrv", '/org/seul/Xboxdrv/Daemon') bus.get_object("org.seul.Xboxdrv", '/org/seul/Xboxdrv/Daemon')
except dbus.exceptions.DBusException: except dbus.exceptions.DBusException:
bus = dbus.SystemBus() bus = dbus.SystemBus()
else: else:
print("Error: invalid argument to --bus. Must be 'auto', 'session, or 'system'") print("Error: invalid argument to --bus. Must be 'auto', 'session, or 'system'")
exit() exit()
@ -87,7 +87,7 @@ else:
else: else:
if options.slot != None: if options.slot != None:
slot = bus.get_object("org.seul.Xboxdrv", '/org/seul/Xboxdrv/ControllerSlots/%d' % options.slot) slot = bus.get_object("org.seul.Xboxdrv", '/org/seul/Xboxdrv/ControllerSlots/%d' % options.slot)
if options.led != None: if options.led != None:
slot.SetLed(options.led) slot.SetLed(options.led)