aboutsummaryrefslogtreecommitdiffstats
path: root/epy.py
diff options
context:
space:
mode:
authorbenadha <benawiadha@gmail.com>2022-01-08 10:37:48 +0700
committerbenadha <benawiadha@gmail.com>2022-01-08 10:37:48 +0700
commit0f98e2140f3fb9f3850674351f0fcc416dfa00b9 (patch)
treeca94e6781dd918d4e97a6e9f5d781bc118fc735c /epy.py
parentc0bfec3da1c55ae11a991a89938261c4e93ce795 (diff)
downloadepy-0f98e2140f3fb9f3850674351f0fcc416dfa00b9.tar.gz
Cleanup on failed ebook initialization
Diffstat (limited to 'epy.py')
-rwxr-xr-xepy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/epy.py b/epy.py
index 54245f0..0df16e8 100755
--- a/epy.py
+++ b/epy.py
@@ -2180,7 +2180,8 @@ class Reader:
self.ebook = ebook
try:
self.ebook.initialize()
- except Exception as e:
+ except (KeyboardInterrupt, Exception) as e:
+ self.ebook.cleanup()
if DEBUG:
raise e
else: