Changeset 75c0cab for server/lib
- Timestamp:
- Mar 10, 2011, 12:45:11 AM (14 years ago)
- Branches:
- no-cups
- Children:
- a76f440
- Parents:
- a6a1f43
- git-author:
- Quentin Smith <quentin@…> (03/10/11 00:45:11)
- git-committer:
- Quentin Smith <quentin@…> (03/10/11 00:45:11)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/ippattribute.py
rfc427ef r75c0cab 66 66 "Value must be of type Value" 67 67 68 self.name = None 69 self.values = None 70 71 if name is not None: 72 self.name = name 73 if name is not None and len(values) > 0: 74 self.values = values 75 self.binary = self.pack() 76 self.verify() 68 self.name = name 69 self.values = values 77 70 78 71 @property … … 140 133 Gets the total size of the attribute. 141 134 """ 142 return 2+len(self.name)+sum(v.total_size for v in self.values)135 return len(self.packed_value) 143 136 144 137 total_size = packed_value_size … … 156 149 157 150 return "%s: %s" % (name, str(values)) 151 152 def __repr__(self): 153 return '<IPPAttribute (%r, %r)>' % (self.name, self.values)
Note: See TracChangeset
for help on using the changeset viewer.