Reduce verbosity of module files warning

1. Currently it prints not just the spec name, but the dependencies +
their variants + their compilers + their architectures + ...
2. It's clear from the context what spec the message applies to, so,
let's not print the spec at all.
This commit is contained in:
Harmen Stoppels 2021-10-25 15:55:51 +02:00 committed by Massimiliano Culpo
parent b51e0b363e
commit 276e637522

View File

@ -836,9 +836,7 @@ def write(self, overwrite=False):
# Print a warning in case I am accidentally overwriting # Print a warning in case I am accidentally overwriting
# a module file that is already there (name clash) # a module file that is already there (name clash)
if not overwrite and os.path.exists(self.layout.filename): if not overwrite and os.path.exists(self.layout.filename):
message = 'Module file already exists : skipping creation\n' message = 'Module file {0.filename} exists and will not be overwritten'
message += 'file : {0.filename}\n'
message += 'spec : {0.spec}'
tty.warn(message.format(self.layout)) tty.warn(message.format(self.layout))
return return