scripts: parse_syscalls: Multiplatform separators

In order to support both "/" and "\" as OS path separators,
use the correct Python os.sep helper.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2018-01-11 15:14:54 +01:00 committed by Anas Nashif
commit 907735dd58

View file

@ -103,7 +103,7 @@ def analyze_headers(base_path):
# toolchain/common.h has the definition of __syscall which we
# don't want to trip over
path = os.path.join(root, fn)
if not fn.endswith(".h") or path.endswith("toolchain/common.h"):
if not fn.endswith(".h") or path.endswith(os.path.join(os.sep, 'toolchain', 'common.h')):
continue
with open(path, "r", encoding="utf-8") as fp: