Browse Source

Remove useless argument; Add docstring

pull/113/head
Louis 9 years ago
parent
commit
efa1b5e4c9
  1. 5
      patacrep/build.py

5
patacrep/build.py

@ -266,7 +266,8 @@ class SongbookBuilder(object):
with codecs.open(sxd_file[:-3] + "sbx", "w", "utf-8") as index_file:
index_file.write(idx.entries_to_str())
def _set_interpolation(self, command):
def _get_interpolation(self):
"""Return the interpolation values for a custom command."""
interpolation = {
"basename": self.basename,
}
@ -283,7 +284,7 @@ class SongbookBuilder(object):
def build_custom(self, command):
"""Run a shell command"""
interpolation = self._run_once(self._set_interpolation, command)
interpolation = self._run_once(self._get_interpolation)
try:
formatted_command = command.format(**interpolation)
except KeyError as error:

Loading…
Cancel
Save