diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-07-27 12:55:41 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-07-27 12:55:41 -0400 |
commit | ac5e207241f06156e6926c571558c4eff701cb18 (patch) | |
tree | 01d0b5852c57c539a0651b05bc1a1d677b66b1a4 | |
parent | 7c7de85f01417152a8dd8956f7804d7651ac0398 (diff) | |
download | kutter-ac5e207241f06156e6926c571558c4eff701cb18.tar.gz kutter-ac5e207241f06156e6926c571558c4eff701cb18.tar.xz kutter-ac5e207241f06156e6926c571558c4eff701cb18.zip |
check_whitespace: Minor simplification of control char check
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rwxr-xr-x | scripts/check_whitespace.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/check_whitespace.py b/scripts/check_whitespace.py index 13c4a3ed..3ee68693 100755 --- a/scripts/check_whitespace.py +++ b/scripts/check_whitespace.py @@ -36,10 +36,9 @@ def check_file(filename): continue # Check for control characters for c in line: - oc = ord(c) - if oc < 32 or unicodedata.category(c).startswith('C'): + if unicodedata.category(c).startswith('C'): char_name = repr(c) - if oc == 9: + if c == '\t': if os.path.basename(filename).lower() == 'makefile': continue char_name = 'tab' |