Simplify arg placeholder replacement

This commit is contained in:
Oliver Caldwell 2016-01-31 22:56:11 +00:00
parent 54ff2aa46c
commit 4cd7d193f1

View File

@ -124,6 +124,6 @@ class ExternalEditor(QObject):
self._proc.error.connect(self.on_proc_error)
editor = config.get('general', 'editor')
executable = editor[0]
args = [arg.replace('{}', self._filename) if '{}' in arg else arg for arg in editor[1:]]
args = [arg.replace('{}', self._filename) for arg in editor[1:]]
log.procs.debug("Calling \"{}\" with args {}".format(executable, args))
self._proc.start(executable, args)