Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions threespot/validation/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ def validate_file_size(file, max_size_kb=1024, label='file'):

def validate_image_dimensions(image_file, required_width, required_height):
"""
Validates the dimensions, raises a ValidationErrror for images
Validates the dimensions, raises a ValidationError for images
that are too large.
"""
width, height = get_image_dimensions(image_file)
if width != required_width or height != required_height:
raise forms.ValidationError, (
"Images must be %d pixels wide and %d pixels high; This "
"image is %d pixels wide and %d pixels high."
) % (required_width, required_height, width, height)
) % (required_width, required_height, width, height)