2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2025-01-07 08:55:31 +01:00

Slightly better error messages

This commit is contained in:
Thomas Nagy 2014-02-14 21:25:38 +01:00
parent 9febff1d4a
commit fde332a58b

View File

@ -294,16 +294,17 @@ def distclean(ctx):
pass
except OSError as e:
if e.errno != errno.ENOENT:
Logs.warn('project %r cannot be removed' % proj[Context.OUT])
Logs.warn('Could not remove %r' % proj['out_dir'])
else:
distclean_dir(proj['out_dir'])
for k in (proj['out_dir'], proj['top_dir'], proj['run_dir']):
p = os.path.join(k, Options.lockfile)
try:
os.remove(os.path.join(k, Options.lockfile))
os.remove(p)
except OSError as e:
if e.errno != errno.ENOENT:
Logs.warn('file %r cannot be removed' % f)
Logs.warn('Could not remove %r' % p)
# remove local waf cache folders
if not Options.commands: