Skip to content

Commit

Permalink
make cli not require a running daemon for all commands
Browse files Browse the repository at this point in the history
  • Loading branch information
sezanzeb authored and sezanzeb committed Jan 11, 2021
1 parent 9895336 commit 03f2e34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/key-mapper-control
Original file line number Diff line number Diff line change
Expand Up @@ -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()):
Expand Down Expand Up @@ -171,7 +174,4 @@ if __name__ == '__main__':

daemon = get_dbus_interface(fallback=False)

if daemon is None:
sys.exit(0)

main(options, daemon)

0 comments on commit 03f2e34

Please sign in to comment.