commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/common/src GDataObjects.py


From: Jason Cater
Subject: gnue/common/src GDataObjects.py
Date: Tue, 22 Jan 2002 23:08:46 -0500

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    02/01/22 23:08:46

Modified files:
        common/src     : GDataObjects.py 

Log message:
        fixed bug in Schema comparion function that made a Schema() instance 
appear to be == None

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GDataObjects.py.diff?cvsroot=OldCVS&tr1=1.38&tr2=1.39&r1=text&r2=text

Patches:
Index: gnue/common/src/GDataObjects.py
diff -c gnue/common/src/GDataObjects.py:1.38 
gnue/common/src/GDataObjects.py:1.39
*** gnue/common/src/GDataObjects.py:1.38        Tue Jan 22 21:48:53 2002
--- gnue/common/src/GDataObjects.py     Tue Jan 22 23:08:46 2002
***************
*** 672,680 ****
  
    def __cmp__(self, other):
      if not isinstance(other, Schema):
!       return cmp(self,other)
! 
!     return cmp(string.lower(self.name), string.lower(other.name))
  
    def getChildSchema(self, parent):
      return ()
--- 672,682 ----
  
    def __cmp__(self, other):
      if not isinstance(other, Schema):
!       return 1
!     elif id(other) == id(self):
!       return 0
!     else:
!       return cmp(string.lower(self.name), string.lower(other.name)) or 1
  
    def getChildSchema(self, parent):
      return ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]