From 76bd6654151f8d5d51e7893414043d33e1013d2b Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 18 Jan 2016 19:00:20 +0100 Subject: [PATCH] Fix import errors --- patacrep/songbook/__main__.py | 3 ++- patacrep/tools/cache/__main__.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/patacrep/songbook/__main__.py b/patacrep/songbook/__main__.py index bac1c5ea..5c75084b 100644 --- a/patacrep/songbook/__main__.py +++ b/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: diff --git a/patacrep/tools/cache/__main__.py b/patacrep/tools/cache/__main__.py index 4aa8b2ec..22bce3fc 100644 --- a/patacrep/tools/cache/__main__.py +++ b/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):