Browse Source

Fix import errors

pull/189/head
Louis 9 years ago
parent
commit
76bd665415
  1. 3
      patacrep/songbook/__main__.py
  2. 4
      patacrep/tools/cache/__main__.py

3
patacrep/songbook/__main__.py

@ -8,6 +8,7 @@ import textwrap
from patacrep import __version__
from patacrep import errors
from patacrep.songbook import open_songbook
from patacrep.build import SongbookBuilder, DEFAULT_STEPS
from patacrep.utils import yesno
import patacrep.encoding
@ -125,7 +126,7 @@ def main(args):
options = argument_parser(args[1:])
try:
songbook = patacrep.songbook.open_songbook(options.book[-1])
songbook = open_songbook(options.book[-1])
# Command line options
if options.datadir:

4
patacrep/tools/cache/__main__.py

@ -8,7 +8,7 @@ import sys
import textwrap
from patacrep import errors
from patacrep import songbook
from patacrep.songbook import open_songbook
LOGGER = logging.getLogger("patatools.cache")
SUBCOMMAND_DESCRIPTION = "Perform operations on cache."
@ -54,7 +54,7 @@ def commandline_parser():
def do_clean(namespace):
"""Execute the `patatools cache clean` command."""
for datadir in songbook.open_songbook(namespace.songbook)['datadir']:
for datadir in open_songbook(namespace.songbook)['datadir']:
cachedir = os.path.join(datadir, ".cache")
LOGGER.info("Deleting cache directory '{}'...".format(cachedir))
if os.path.isdir(cachedir):

Loading…
Cancel
Save