From: Urban Wallasch Date: Tue, 15 Jun 2021 15:50:26 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.latice.de/var/lib/git/jiten-pai X-Git-Tag: v0.1.0~137 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=96eb7267d30a53ec6473d73a93a446f718d90736;p=jiten-pai.git Merge branch 'master' of ssh://git.latice.de/var/lib/git/jiten-pai --- 96eb7267d30a53ec6473d73a93a446f718d90736 diff --cc jiten-pai.py index 5dc4d84,c331833..a501e2a --- a/jiten-pai.py +++ b/jiten-pai.py @@@ -484,9 -481,12 +491,12 @@@ class jpMainWindow(QMainWindow) def dict_lookup(dict_fname, pattern, mode, max_res=0): result = [] - cnt = 0; + cnt = 0 with open(dict_fname) as dict_file: - re_pattern = re.compile(pattern, re.IGNORECASE) + try: + re_pattern = re.compile(pattern, re.IGNORECASE) + except: + return result for line in dict_file: if max_res and cnt >= max_res: break