#NEWLINE# def validate( self ) : #NEWLINE# #INDENT# class_names = [ ':' . join ( self . generate_css_name ( i . filename ) ) for i in self . sprite . images ] #NEWLINE# if ( len ( set ( class_names ) ) != len ( self . sprite . images ) ) : #NEWLINE# #INDENT# dup = [ i for i in self . sprite . images if ( class_names . count ( ':' . join ( self . generate_css_name ( i . filename ) ) ) > 1 ) ] #NEWLINE# duptext = '\n' . join ( [ '\t{0} => .{1}' . format ( os . path . relpath ( d . path ) , ':' . join ( self . generate_css_name ( d . filename ) ) ) for d in dup ] ) #NEWLINE# raise ValidationError ( 'Error: Some images will have the same class name:\n{0}' . format ( duptext ) ) #NEWLINE# #UNINDENT# return True