Changeset 12418


Ignore:
Timestamp:
8 Jan 2015, 10:27:06 (10 years ago)
Author:
Henrik Bettermann
Message:

Do not compare ResultEntry? objects but their attribtes.

Location:
main/waeup.kofa/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r12415 r12418  
    441.3dev (unreleased)
    55===================
     6
     7* Do not compare ResultEntry objects but their attribtes.
    68
    79* Modify getWidgetsData so that we always get the same error format.
  • main/waeup.kofa/trunk/src/waeup/kofa/schoolgrades.py

    r9055 r12418  
    4242            self.grade = grade
    4343        return
     44
     45    def __eq__(self, obj):
     46        default = object()
     47        result = []
     48        for name in ('subject', 'grade',):
     49            result.append(
     50                getattr(self, name) == getattr(obj, name, default))
     51        return False not in result
    4452
    4553    def to_string(self):
Note: See TracChangeset for help on using the changeset viewer.