mirror of
https://github.com/sezanzeb/input-remapper
synced 2024-11-18 03:25:52 +00:00
make cli not require a running daemon for all commands
This commit is contained in:
parent
98953368a9
commit
03f2e34c8f
@ -87,6 +87,9 @@ def main(options, daemon):
|
||||
if options.command not in [AUTOLOAD, START, STOP, HELLO, STOP_ALL]:
|
||||
logger.error('Unknown command "%s"', options.command)
|
||||
|
||||
if daemon is None:
|
||||
sys.exit(0)
|
||||
|
||||
if options.command == AUTOLOAD:
|
||||
daemon.stop()
|
||||
for device, preset in list(config.iterate_autoload_presets()):
|
||||
@ -171,7 +174,4 @@ if __name__ == '__main__':
|
||||
|
||||
daemon = get_dbus_interface(fallback=False)
|
||||
|
||||
if daemon is None:
|
||||
sys.exit(0)
|
||||
|
||||
main(options, daemon)
|
||||
|
Loading…
Reference in New Issue
Block a user