Changeset 18:4c42d5706f2d in livinglogic.python.tipimaid

Show
Ignore:
Timestamp:
11/24/08 16:15:31 (10 years ago)
Author:
Nikolas Tautenhahn <nik@…>
Branch:
default
Message:

<= operator implemented, now the check whether we can only append an item actually works! Removed some comments

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • liaalh.py

    r17 r18  
    1010    def __lt__(self, other): 
    1111        return self[0] < other[0] 
     12 
     13    def __le__(self, other): 
     14        return self[0] <= other[0] 
     15 
    1216 
    1317class Buffer(object): 
     
    2933            debugfile.write("%s: %r\n" % (datetime.datetime.now().isoformat(), logline)) 
    3034            debugfile.close() 
    31         if not self.data or logline > self.data[-1]: 
     35        if not self.data or self.data[-1] <= logline: 
    3236            self.data.append(logline) 
    3337        else: 
     
    5862                self.servers[server] = f 
    5963            f.write(logdata) 
    60 #           sys.stderr.write("writing %r" % logdata) 
    61 #           sys.stderr.flush() 
    6264            self.data.pop(0) 
    6365            f.flush()