]> git.armaanb.net Git - lightcards.git/commitdiff
Remove CursesError exception
authorArmaan Bhojwani <me@armaanb.net>
Sun, 14 Feb 2021 18:17:50 +0000 (13:17 -0500)
committerArmaan Bhojwani <me@armaanb.net>
Sun, 14 Feb 2021 18:17:50 +0000 (13:17 -0500)
lightcards/display.py
lightcards/runner.py

index 87ab9ae45db9cc1cd75bb6869327c2f7c7fa494f..5ecb14c0d984d98351efbf393d4bde71bb9aa0ae 100644 (file)
@@ -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
index 0bd560072b3b2720afd77d795db3f2bd9bf8ac33..40b5b15f25673e0f2c4599ebb950249a35f98977 100644 (file)
@@ -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():