From d768721532cf86de1da80c2a42c732648a5ac9f3 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 28 May 2018 12:01:15 +0300 Subject: Change: use {} instead of %s in --editor values %s causes problems with the Python 3.6 configparser in Debian unstable. --- jtlib/app.py | 7 ++++--- 1 file 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): -- cgit v1.2.1