Changeset 3192

Show
Ignore:
Timestamp:
06/20/07 23:51:23 (17 years ago)
Author:
jerome
Message:

Doesn't put empty strings in the buffer, otherwise we may end up eating all the available memory.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/accounters/pjl.py

    r3180 r3192  
    119119                    self.parent.filter.printInfo(_("Problem while receiving PJL answer from %s:%s : %s") % (self.printerHostname, self.port, str(msg)), "warn") 
    120120            else :     
    121                 buffer.append(answer) 
    122                 if answer.endswith(FORMFEEDCHAR) : 
    123                     self.queue.put("".join(buffer)) 
    124                     buffer = [] 
     121                if answer : 
     122                    buffer.append(answer) 
     123                    if answer.endswith(FORMFEEDCHAR) : 
     124                        self.queue.put("".join(buffer)) 
     125                        buffer = [] 
    125126        if buffer :              
    126127            self.queue.put("".join(buffer))