Changeset 6584 for main


Ignore:
Timestamp:
8 Aug 2011, 19:18:30 (13 years ago)
Author:
uli
Message:

Fix bug in hurry.file.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/image
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/image/README.txt

    r6526 r6584  
    194194  TooSmall: ('bar.jpg', '4 bytes (min: 5 bytes)')
    195195
     196
     197Broken Unequality Comparison
     198----------------------------
     199
     200WAeUPImageFile does not reproduce the broken unequal comparison from
     201its base:
     202
     203  >>> f1 = WAeUPImageFile('bar.jpg', '123456789')
     204  >>> f2 = WAeUPImageFile('bar.jpg', '123456789')
     205  >>> f3 = WAeUPImageFile('baz.jpg', '1234')
     206  >>> f1 == f2
     207  True
     208
     209  >>> f1 != f2
     210  False
     211
     212  >>> f1 == f3
     213  False
     214
     215  >>> f1 != f3
     216  True
  • main/waeup.sirp/trunk/src/waeup/sirp/image/image.py

    r6536 r6584  
    4141    implements(IWAeUPImageFile)
    4242
     43    def __ne__(self, other):
     44        # This was wrongly implemented in the base class
     45        try:
     46            return (self.filename != other.filename or
     47                    self.data != other.data)
     48        except AttributeError:
     49            return True
     50
    4351def createWAeUPImageFile(filename, f):
    4452    retrieval = getUtility(IFileRetrieval)
Note: See TracChangeset for help on using the changeset viewer.