summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-03-19 22:49:59 +0800
committerGitHub <[email protected]>2021-03-19 22:49:59 +0800
commita18cb0c0642e64471993cfea8cbd7319a062b998 (patch)
tree6cee2a39963ac03227e089ac803345e1f26337cd /tools
parent6de81af04cbef6825f1d0d9921bacc59df2c7189 (diff)
parent4913e2b5d11eab7ead39557d3bd171c939717b2b (diff)
Merge pull request #4481 from thread-liu/liukang
[update] eclipse.py, to compatible with tricore.
Diffstat (limited to 'tools')
-rw-r--r--tools/eclipse.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/eclipse.py b/tools/eclipse.py
index 4f3cda92b8..74c697011e 100644
--- a/tools/eclipse.py
+++ b/tools/eclipse.py
@@ -448,8 +448,10 @@ def RelativeProjectPath(env, path):
def HandleExcludingOption(entry, sourceEntries, excluding):
old_excluding = []
if entry != None:
- old_excluding = entry.get('excluding').split('|')
- sourceEntries.remove(entry)
+ exclud = entry.get('excluding')
+ if exclud != None:
+ old_excluding = entry.get('excluding').split('|')
+ sourceEntries.remove(entry)
value = ''
for item in old_excluding:
@@ -484,8 +486,9 @@ def UpdateCproject(env, project, excluding, reset, prj_name):
HandleToolOption(tools, env, project, reset)
sourceEntries = cconfiguration.find('storageModule/configuration/sourceEntries')
- entry = sourceEntries.find('entry')
- HandleExcludingOption(entry, sourceEntries, excluding)
+ if sourceEntries != None:
+ entry = sourceEntries.find('entry')
+ HandleExcludingOption(entry, sourceEntries, excluding)
# update refreshScope
if prj_name:
prj_name = '/' + prj_name