From 276e637522619c83fee027ba8ffa4bab874c6304 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 25 Oct 2021 15:55:51 +0200 Subject: 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. --- lib/spack/spack/modules/common.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 0e9c8eac68..7c34a5338e 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -836,9 +836,7 @@ class BaseModuleFileWriter(object): # Print a warning in case I am accidentally overwriting # a module file that is already there (name clash) if not overwrite and os.path.exists(self.layout.filename): - message = 'Module file already exists : skipping creation\n' - message += 'file : {0.filename}\n' - message += 'spec : {0.spec}' + message = 'Module file {0.filename} exists and will not be overwritten' tty.warn(message.format(self.layout)) return -- cgit v1.2.3-70-g09d2