build: Do not print error/warning counts if they equal to zero

This commit is contained in:
Fatih Aşıcı
2010-10-07 08:26:36 +00:00
parent c0ec957842
commit 44c91bde39
+3 -1
View File
@@ -1102,7 +1102,9 @@ def build(pspec):
ctx.ui.error("Action script error caught.")
raise e
finally:
ctx.ui.warning(_("*** %d error(s), %d warning(s)") % (ctx.ui.errors, ctx.ui.warnings))
if ctx.ui.errors or ctx.ui.warnings:
ctx.ui.warning(_("*** %d error(s), %d warning(s)") \
% (ctx.ui.errors, ctx.ui.warnings))
return result
order = {"none": 0,