scripts/: Update from upstream
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I80ef0cae9a40fc666c4663cd5ae2d731991a2302
diff --git a/scripts/parse_refspec.py b/scripts/parse_refspec.py
index 83fd30e..574d516 100755
--- a/scripts/parse_refspec.py
+++ b/scripts/parse_refspec.py
@@ -46,9 +46,8 @@
changes.pop()
if not changes:
- raise Exception("Can not find anything.")
-
-if len(changes) > 1:
- print_topic_tip(changes)
+ print("Warning: no changes found, returning empty string", file=sys.stderr)
+elif len(changes) > 1:
+ print_topic_tip(changes)
else:
print(changes[0]["currentPatchSet"]["ref"])