X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=scripts%2Fml-search.py;h=24db982fafb1b4cf80ef45741e0ec1d5b76380f5;hb=961cab22b2f5da852df95ca0155dc4207acaecd9;hp=7cc32e187d9b913d46010e0b06b9cc275c4bb383;hpb=5932dd9301f9820b2b103545593606909f8eceb8;p=m_librarian.git diff --git a/scripts/ml-search.py b/scripts/ml-search.py index 7cc32e1..24db982 100755 --- a/scripts/ml-search.py +++ b/scripts/ml-search.py @@ -2,10 +2,6 @@ from __future__ import print_function import argparse -try: - from configparser import NoSectionError, NoOptionError -except ImportError: # Python 2 - from ConfigParser import NoSectionError, NoOptionError import os import sys from sqlobject.sqlbuilder import CONCAT @@ -207,10 +203,7 @@ def _search_books(case_sensitive, search_type, args): if args.get or args.get_many: download_to = args.download_to if download_to is None: - try: - download_to = get_config().get('download', 'path') - except (NoSectionError, NoOptionError): - download_to = os.path.curdir + download_to = get_config().getpath('download', 'path') download(book, download_to, args.path, args.format) count += 1 print_count(count)