1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

waf: use Utils.WafError() instead of sys.exit(1)

better to raise an expection than just exiting
This commit is contained in:
Andrew Tridgell 2011-02-09 15:54:07 +11:00
parent 7720facd42
commit a7ee6e81ff

View File

@ -288,8 +288,7 @@ def check_duplicate_sources(bld, tgt_list):
Logs.warn("WARNING: source %s is in more than one target: %s" % (s, subsystems[s].keys()))
for tname in subsystems[s]:
if len(subsystems[s][tname]) > 1:
Logs.error("ERROR: source %s is in more than one subsystem of target '%s': %s" % (s, tname, subsystems[s][tname]))
sys.exit(1)
raise Utils.WafError("ERROR: source %s is in more than one subsystem of target '%s': %s" % (s, tname, subsystems[s][tname]))
return ret