- Timestamp:
- 05/29/05 00:07:41 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/ipp.py
r2272 r2273 42 42 return self.message 43 43 __str__ = __repr__ 44 45 attributes_types = ("operation", "job", "printer", "unsupported")46 44 47 45 class IPPMessage : … … 63 61 print " %s : %s" % (key, attrdict[key]) 64 62 """ 63 attributes_types = ("operation", "job", "printer", "unsupported") 65 64 def __init__(self, data, debug=0) : 66 65 """Initializes and parses IPP Message object. … … 73 72 self.debug = debug 74 73 self.data = data 75 for attrtype in attributes_types :74 for attrtype in self.attributes_types : 76 75 setattr(self, "%s_attributes" % attrtype, {}) 77 76 self.tags = [ None ] * 256 # by default all tags reserved … … 201 200 202 201 # Now transform all one-element lists into single values 203 for attrtype in attributes_types :202 for attrtype in self.attributes_types : 204 203 attrdict = getattr(self, "%s_attributes" % attrtype) 205 204 for (key, value) in attrdict.items() : … … 217 216 print "IPP operation Id : %s" % message.operation_id 218 217 print "IPP request Id : %s" % message.request_id 219 for attrtype in attributes_types :218 for attrtype in message.attributes_types : 220 219 attrdict = getattr(message, "%s_attributes" % attrtype) 221 220 if attrdict :