Move print statements to logger methods
This commit is contained in:
parent
94744fb55f
commit
a150259538
1 changed files with 3 additions and 3 deletions
|
@ -77,14 +77,14 @@ def query_document(db, author, title):
|
|||
|
||||
|
||||
def add_to_database(author, title, confirm=True, edit=False):
|
||||
print(f"Searching - '{title} {author}'")
|
||||
logger.info(f"Searching - '{title} {author}'")
|
||||
data = None
|
||||
try:
|
||||
data = papis.isbn.get_data(f"{title}")
|
||||
except isbnlib.ISBNLibException as e:
|
||||
print(f"ERROR: {e}")
|
||||
logger.error(e)
|
||||
else:
|
||||
print(f"Found: {data}")
|
||||
logger.info(f"Found: {data}")
|
||||
if data:
|
||||
papis_data = papis.isbn.data_to_papis(data[0])
|
||||
papis.commands.add.run([], data=papis_data, confirm=confirm, edit=edit)
|
||||
|
|
Loading…
Reference in a new issue