From a32f80e459c2fa88cfde61fd80d1a8543cc51e8b Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Sun, 14 Feb 2021 13:17:50 -0500 Subject: [PATCH] Remove CursesError exception --- lightcards/display.py | 7 ------- lightcards/runner.py | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lightcards/display.py b/lightcards/display.py index 87ab9ae..5ecb14c 100644 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -20,13 +20,6 @@ def panel_create(x, y): return (win, panel) -class CursesError(BaseException): - def __init__(self, message="lightcards: Curses error!"): - self.message = message - print(self.message) - sys.exit(3) - - class Quit: def __init__(self, outer, mlines=5, mcols=20): self.outer = outer diff --git a/lightcards/runner.py b/lightcards/runner.py index 0bd5600..40b5b15 100644 --- a/lightcards/runner.py +++ b/lightcards/runner.py @@ -8,7 +8,7 @@ from random import shuffle import sys from . import parse, progress, config -from .display import Display, CursesError +from .display import Display from .deck import Status @@ -108,7 +108,7 @@ def show(args, stack, headers, conf): try: curses.wrapper(win.run) except curses.error as e: - raise CursesError() from e + raise e def get_orig(): -- 2.39.2