From 240451b978d5775f0e936ed57d682ca1ccee604d Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Wed, 29 Aug 2018 02:17:32 +0100 Subject: [PATCH] [skip ci] Fix the rsplit issue in Linux --- tools/utils.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/utils.py b/tools/utils.py index fa501096a4..fb151189d8 100644 --- a/tools/utils.py +++ b/tools/utils.py @@ -114,11 +114,14 @@ def walk_children(child): # print child full_path = child.rfile().abspath - file_type = full_path.rsplit('.',1)[1] + file_type_list = full_path.rsplit('.',1) #print file_type - if file_type in source_ext: - if full_path not in source_list: - source_list.append(full_path) + if (len(file_type_list) > 1): + file_type = full_path.rsplit('.',1)[1] + + if file_type in source_ext: + if full_path not in source_list: + source_list.append(full_path) children = child.all_children() if children != []: