* Fixed minor bug in exception handler.
authorUrban Wallasch <urban.wallasch@freenet.de>
Fri, 25 Jun 2021 17:59:30 +0000 (19:59 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Fri, 25 Jun 2021 17:59:30 +0000 (19:59 +0200)
jiten-pai.py

index 7247f7e8424c4276df9b01199581e38224ef614b..96d2bcce30da9ed318da8392eb441476fefc385e 100755 (executable)
@@ -1457,7 +1457,7 @@ def dict_lookup(dict_fname, pattern, mode, limit=0):
                     term = p1[0].strip()
                     hira = p2[0].strip()
                     trans = ' ' + p2[1].lstrip('/ ').rstrip(' \t\r\n').replace('/', '; ')
-                except:
+                except Exception as e:
                     eprint('malformed line:', line, ':', str(e))
                     continue
                 if (mode == ScanMode.JAP and (re_pattern.search(hira) or re_pattern.search(kata2hira(term)))) \