diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2020-03-08 23:05:48 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2020-03-08 23:05:48 +0100 |
commit | e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012 (patch) | |
tree | f842adabb9a267f9df0feabd38a9292a5749924d | |
parent | 379c8bb8a58de094965a88fb38c28c3004f28660 (diff) | |
download | utils-e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012.tar utils-e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012.tar.gz utils-e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012.tar.bz2 utils-e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012.tar.xz utils-e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012.zip |
...
-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) |