aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/series.py
diff options
context:
space:
mode:
authorSimon Glass2020-10-29 21:46:25 -0600
committerSimon Glass2020-11-05 09:11:31 -0700
commitdffa42c3ef98a8f9bc26a221cdfc3fcfb9f0fa40 (patch)
treeba5b3d635f1f729fa4da83df43289153bbf8bb75 /tools/patman/series.py
parent313ef5f897f15bc7ec2ca8054f4e4871a2f6be93 (diff)
patman: Convert 'Series-xxx' tag errors into warnings
If the Series-xxx tag is not recognised patman currently reports a fatal error. This is inconvenient if a new feature is later added to patman that an earlier version does not support. Report a warning instead, to allow the user to take action if needed, but still allow operation to proceed. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/series.py')
-rw-r--r--tools/patman/series.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/patman/series.py b/tools/patman/series.py
index 393a44241bd..4457719f2ef 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -59,6 +59,9 @@ class Series(dict):
line: Source line containing tag (useful for debug/error messages)
name: Tag name (part after 'Series-')
value: Tag value (part after 'Series-xxx: ')
+
+ Returns:
+ String warning if something went wrong, else None
"""
# If we already have it, then add to our list
name = name.replace('-', '_')
@@ -78,9 +81,10 @@ class Series(dict):
else:
self[name] = value
else:
- raise ValueError("In %s: line '%s': Unknown 'Series-%s': valid "
+ return ("In %s: line '%s': Unknown 'Series-%s': valid "
"options are %s" % (commit.hash, line, name,
', '.join(valid_series)))
+ return None
def AddCommit(self, commit):
"""Add a commit into our list of commits