diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-05-28 12:01:15 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-05-28 12:01:15 +0300 |
commit | d768721532cf86de1da80c2a42c732648a5ac9f3 (patch) | |
tree | b7d8cb8adb7ae7044dc3330a4ff0cb17978429c8 /jtlib | |
parent | 79940305e8d53ef10fabebaa57324e00314011ae (diff) | |
download | jt-d768721532cf86de1da80c2a42c732648a5ac9f3.tar.gz |
Change: use {} instead of %s in --editor values
%s causes problems with the Python 3.6 configparser in Debian
unstable.
Diffstat (limited to 'jtlib')
-rw-r--r-- | jtlib/app.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jtlib/app.py b/jtlib/app.py index 760b9a4..4894bf0 100644 --- a/jtlib/app.py +++ b/jtlib/app.py @@ -50,9 +50,9 @@ class JournalTool(cliapp.Application): self.settings.string( ['editor'], - 'editor to launch for journal entries. Must include %s to ' + 'editor to launch for journal entries. Must include {editor} to ' 'indicate where the filename goes', - default='sensible-editor %s') + default='sensible-editor {editor}') self.settings.boolean( ['push'], @@ -126,7 +126,8 @@ class JournalTool(cliapp.Application): def edit_file(self, pathname): safe_pathname = cliapp.shell_quote(pathname) - cmdline = ['sh', '-c', self.settings['editor'] % safe_pathname] + cmdline = [ + 'sh', '-c', self.settings['editor'].format(editor=safe_pathname)] self.runcmd(cmdline, stdin=None, stdout=None, stderr=None) def choose_draft(self, drafts_dir, args): |