Add traceback in on exception in debug mode

This commit is contained in:
Joakim Holm 2023-06-27 20:33:14 +02:00
parent 4da73a73e1
commit 40de5bf479

View File

@ -9,6 +9,7 @@ from typing import Tuple, Optional
from rich.progress import Progress
from functools import partial
import asyncio
import traceback
def get_login(source: Source, config: Config, options) -> Tuple[str, str, Optional[str]]:
@ -89,6 +90,9 @@ async def main() -> None:
logging.info("")
except GrawlixError as error:
error.print_error()
if logging.debug_mode:
traceback.print_exc()
exit(1)
async def download_with_progress(book: Book, progress: Progress, template: str):