From 7f1f450080c1029cb2b3c008ca527c00338147f4 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Tue, 23 May 2017 12:14:32 -0700 Subject: [PATCH] Rewrite duplicate override error message Signed-off-by: Joffrey F --- compose/config/errors.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/compose/config/errors.py b/compose/config/errors.py index 060564fc4..ac1d3ac19 100644 --- a/compose/config/errors.py +++ b/compose/config/errors.py @@ -49,10 +49,7 @@ class ComposeFileNotFound(ConfigurationError): class DuplicateOverrideFileFound(ConfigurationError): def __init__(self, override_filenames): self.override_filenames = override_filenames - - @property - def msg(self): - return """ - Unable to determine with duplicate override files, only a single override file can be used. - Found: %s - """ % ", ".join(self.override_filenames) + super(DuplicateOverrideFileFound, self).__init__( + "Multiple override files found: {}. You may only use a single " + "override file.".format(", ".join(override_filenames)) + )