Skip to content

Commit ca75735

Browse files
committed
Fix: E722 do not use bare except
1 parent b22659f commit ca75735

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def is_japanese(ch):
99
name = unicodedata.name(ch)
1010
if "CJK UNIFIED" in name or "HIRAGANA" in name or "KATAKANA" in name:
1111
return True
12-
except:
12+
except ValueError:
1313
pass
1414
return False
1515

tools/tester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def do_test(exec_file=None):
6565
[exec_file, ""], stdin=inf, timeout=1)
6666
except subprocess.TimeoutExpired:
6767
status = "TLE(1s)"
68-
except:
68+
except subprocess.CalledProcessError:
6969
status = "RE"
7070

7171
if out_data == ans_data:

0 commit comments

Comments
 (0)