Avoid a stacktrace when no reviews are pending
Simply skip the whole function when the remote has no reviews and print out a friendly user message. Change-Id: I4c07f05d4b797af056ee08016b150088f3b182db
This commit is contained in:
@@ -788,6 +788,10 @@ def list_reviews(remote):
|
|||||||
exception=CannotQueryOpenChangesets,
|
exception=CannotQueryOpenChangesets,
|
||||||
parse_exc=CannotParseOpenChangesets)
|
parse_exc=CannotParseOpenChangesets)
|
||||||
|
|
||||||
|
if not reviews:
|
||||||
|
print("No pending reviews")
|
||||||
|
return
|
||||||
|
|
||||||
REVIEW_FIELDS = ('number', 'branch', 'subject')
|
REVIEW_FIELDS = ('number', 'branch', 'subject')
|
||||||
FIELDS = range(len(REVIEW_FIELDS))
|
FIELDS = range(len(REVIEW_FIELDS))
|
||||||
if check_color_support():
|
if check_color_support():
|
||||||
|
|||||||
Reference in New Issue
Block a user