From 4aea418ddd02e89ddc117283362eca706a1ab22c Mon Sep 17 00:00:00 2001 From: Aaron Virshup Date: Wed, 27 Sep 2017 14:20:30 -0700 Subject: [PATCH] Fix error test and output for ignore files --- dockermake/imagedefs.py | 5 +++-- test/test_errors.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dockermake/imagedefs.py b/dockermake/imagedefs.py index 3f615bd..efa3c58 100644 --- a/dockermake/imagedefs.py +++ b/dockermake/imagedefs.py @@ -97,8 +97,9 @@ def _check_yaml_and_paths(ymlfilepath, yamldefs): defn['_sourcefile'] = relpath if 'ignore' in defn and 'ignorefile' in defn: - raise errors.MultipleIgnoreError('Image "%s" has both "ignore" AND "ignorefile"' - ' fields. At most ONE of these should be defined') + raise errors.MultipleIgnoreError( + 'Image "%s" has both "ignore" AND "ignorefile" fields.' % imagename + + ' At most ONE of these should be defined') for key in defn: if key not in RECOGNIZED_KEYS: diff --git a/test/test_errors.py b/test/test_errors.py index 03a3474..aabbee0 100644 --- a/test/test_errors.py +++ b/test/test_errors.py @@ -14,7 +14,7 @@ 'data/baddockerfile.yml': errors.ExternalBuildError, 'data/invalid_requires.yml': errors.InvalidRequiresList, 'data/invalid_yaml.yml': errors.ParsingFailure, - 'data/multi_ignore': errors.MultipleIgnoreError, + 'data/multi_ignore.yml': errors.MultipleIgnoreError, }