From ac5e207241f06156e6926c571558c4eff701cb18 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 27 Jul 2018 12:55:41 -0400 Subject: [PATCH] check_whitespace: Minor simplification of control char check Signed-off-by: Kevin O'Connor --- scripts/check_whitespace.py | 5 ++--- 1 file 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'