parse_refspec.py: In case of no useful changes found, don't error out
Just print a warning and return an empty string as ref, which should be
handled by a caller.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I2d6276d7ee6b53c565d128c6fb75bb25bb70045b
diff --git a/scripts/parse_refspec.py b/scripts/parse_refspec.py
index 77657d8..574d516 100755
--- a/scripts/parse_refspec.py
+++ b/scripts/parse_refspec.py
@@ -46,7 +46,7 @@
changes.pop()
if not changes:
- raise Exception("Can not find anything.")
+ print("Warning: no changes found, returning empty string", file=sys.stderr)
elif len(changes) > 1:
print_topic_tip(changes)
else: