summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2020-03-08 23:05:48 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2020-03-08 23:05:48 +0100
commite19e7a1e5372927ccfeb05ee7a17fbdf5daa3012 (patch)
treef842adabb9a267f9df0feabd38a9292a5749924d
parent379c8bb8a58de094965a88fb38c28c3004f28660 (diff)
downloadutils-e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012.tar
utils-e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012.tar.gz
utils-e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012.tar.bz2
utils-e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012.tar.xz
utils-e19e7a1e5372927ccfeb05ee7a17fbdf5daa3012.zip
...
-rw-r--r--notmuch-ssh-server5
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
27original_command = shlex.split(original_command, comments = True) 27original_command = shlex.split(original_command, comments = True)
28logging.debug("Original command: %s", original_command)
28 29
29if len(original_command) < 1: 30if len(original_command) < 1:
30 sys.exit(os.EX_USAGE) 31 sys.exit(os.EX_USAGE)
31 32
32config_section = original_command[0] 33config_section = original_command[0]
34logging.debug("Config section: %s", config_section)
33 35
34command_environment = config[config_section] if config.has_section(config_section) else config[config.default_section] 36command_environment = config[config_section] if config.has_section(config_section) else config[config.default_section]
37logging.info("Command environment: %s", command_environment)
35 38
36logging.info("notmuch %s # %s", original_command[1:], command_environment) 39logging.info("notmuch %s", original_command[1:])
37os.execvpe('@notmuch@/bin/notmuch', original_command[1:], command_environment) 40os.execvpe('@notmuch@/bin/notmuch', original_command[1:], command_environment)