]> git.armaanb.net Git - lightcards.git/blobdiff - lightcards/display.py
Remove CursesError exception
[lightcards.git] / lightcards / display.py
index 1c17a759d2f5182bdb7b2b5a4586d301029ac4cd..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
@@ -311,8 +304,6 @@ class Display:
         return [card for card in self.stack if card.starred]
 
     def prep_bar(self):
-        (mlines, mcols) = self.win.getmaxyx()
-
         # Calculate percent done
         if len(self.stack) <= 1:
             percent = "100"
@@ -553,7 +544,7 @@ class Display:
 
         nstarred = self.nstarred()
         for i, card in enumerate(nstarred):
-            term = card.get()[self.obj.side]
+            term = card.get(smart=False)[0]
             if len(term) > 18:
                 term = term[:18] + "…"