From b9b273118b061374e0437bcf7a11024544a0c4e7 Mon Sep 17 00:00:00 2001 From: Taka Date: Sun, 30 Apr 2017 04:00:10 +0000 Subject: [PATCH] Check if no cards were extracted from the PDF's. --- startup_widget.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/startup_widget.py b/startup_widget.py index 5d5eb2e..df03a34 100644 --- a/startup_widget.py +++ b/startup_widget.py @@ -41,6 +41,8 @@ class AnalyzeThread( QThread ) : on_error = self.on_error , ) cards = self.parser.parse( self.cards_dir ) + if not cards : + raise RuntimeError( "No cards were found." ) db.open_database( self.db_fname , True ) db.add_cards( cards ) except Exception as ex :