Skip to content

Commit

Permalink
Fix error test and output for ignore files
Browse files Browse the repository at this point in the history
  • Loading branch information
avirshup committed Sep 27, 2017
1 parent c3a56b4 commit 4aea418
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dockermake/imagedefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion test/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}


Expand Down

0 comments on commit 4aea418

Please sign in to comment.