diff options
author | wustho <benawiadha@gmail.com> | 2020-04-18 05:29:57 +0700 |
---|---|---|
committer | wustho <benawiadha@gmail.com> | 2020-04-18 05:29:57 +0700 |
commit | 26d23c5910b52af542b9d8bf1ef015afe8d528e5 (patch) | |
tree | d5b0198ecd1fe1c39b591b60095d97328a415213 /epy.py | |
parent | d26500361415fd319c3a252677835eebd871faf3 (diff) | |
download | epy-26d23c5910b52af542b9d8bf1ef015afe8d528e5.tar.gz |
Added errmsg().
Diffstat (limited to 'epy.py')
-rwxr-xr-x | epy.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -677,6 +677,11 @@ def help(): return "Help", src, K["Help"] +@text_win +def errmsg(title, msg, key): + return title, msg, key + + def bookmarks(ebookpath): idx = 0 while True: @@ -1156,11 +1161,11 @@ def reader(ebook, index, width, y, pctg, sect): y = pgend(totlines, rows) elif k in K["ToC"]: if ebook.toc_entries == [[], [], []]: - k = text_win(lambda: ( + k = errmsg( "Table of Contents", "N/A: ToC is unavailable for this book.", K["ToC"] - ))() + ) continue ntoc = find_curr_toc_id(toc_idx, toc_sect, toc_secid, index, y) fllwd, _ = toc(toc_name, ntoc) |