- Timestamp:
- 05/29/05 00:00:43 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/ipp.py
r2254 r2272 42 42 return self.message 43 43 __str__ = __repr__ 44 45 attributes_types = ("operation", "job", "printer", "unsupported") 44 46 45 47 class IPPMessage : … … 71 73 self.debug = debug 72 74 self.data = data 73 self.operation_attributes = {} 74 self.job_attributes = {} 75 self.printer_attributes = {} 76 self.unsupported_attributes = {} 75 for attrtype in attributes_types : 76 setattr(self, "%s_attributes" % attrtype, {}) 77 77 self.tags = [ None ] * 256 # by default all tags reserved 78 78 … … 146 146 oldval = self._curdict.setdefault(name, []) 147 147 oldval.append((tagtype, value)) 148 self.printInfo("%s(%s) %s" % (name, tagtype, value))148 self.printInfo("%s(%s) : %s" % (name, tagtype, value)) 149 149 return posend - self.position 150 150 … … 201 201 202 202 # Now transform all one-element lists into single values 203 for attrtype in ("operation", "job", "printer"):203 for attrtype in attributes_types : 204 204 attrdict = getattr(self, "%s_attributes" % attrtype) 205 205 for (key, value) in attrdict.items() : … … 217 217 print "IPP operation Id : %s" % message.operation_id 218 218 print "IPP request Id : %s" % message.request_id 219 for attrtype in ("operation", "job", "printer", "unsupported"):219 for attrtype in attributes_types : 220 220 attrdict = getattr(message, "%s_attributes" % attrtype) 221 221 if attrdict :