diff options
Diffstat (limited to 'notmuch-ssh-server')
-rw-r--r-- | notmuch-ssh-server | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/notmuch-ssh-server b/notmuch-ssh-server index 5341994..3ff0559 100644 --- a/notmuch-ssh-server +++ b/notmuch-ssh-server | |||
@@ -25,13 +25,16 @@ if original_command is None: | |||
25 | sys.exit(os.EX_USAGE) | 25 | sys.exit(os.EX_USAGE) |
26 | 26 | ||
27 | original_command = shlex.split(original_command, comments = True) | 27 | original_command = shlex.split(original_command, comments = True) |
28 | logging.debug("Original command: %s", original_command) | ||
28 | 29 | ||
29 | if len(original_command) < 1: | 30 | if len(original_command) < 1: |
30 | sys.exit(os.EX_USAGE) | 31 | sys.exit(os.EX_USAGE) |
31 | 32 | ||
32 | config_section = original_command[0] | 33 | config_section = original_command[0] |
34 | logging.debug("Config section: %s", config_section) | ||
33 | 35 | ||
34 | command_environment = config[config_section] if config.has_section(config_section) else config[config.default_section] | 36 | command_environment = config[config_section] if config.has_section(config_section) else config[config.default_section] |
37 | logging.info("Command environment: %s", command_environment) | ||
35 | 38 | ||
36 | logging.info("notmuch %s # %s", original_command[1:], command_environment) | 39 | logging.info("notmuch %s", original_command[1:]) |
37 | os.execvpe('@notmuch@/bin/notmuch', original_command[1:], command_environment) | 40 | os.execvpe('@notmuch@/bin/notmuch', original_command[1:], command_environment) |