Changeset 2646571 for server/lib/ipprequest.py
- Timestamp:
- Mar 5, 2011, 10:36:40 PM (14 years ago)
- Branches:
- no-cups
- Children:
- cf1d291
- Parents:
- 8979f90
- git-author:
- Jessica B. Hamrick <jhamrick@…> (03/05/11 22:36:40)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (03/05/11 22:36:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/ipprequest.py
r8979f90 r2646571 2 2 3 3 import sys, struct, logging 4 from ippattributegroup import IPPAttributeGroup 5 from ippattribute import IPPAttribute 6 from ippvalue import IPPValue 4 7 5 8 # initialize logger … … 108 111 # as long as the next byte isn't signaling the end of the 109 112 # attributes, keep looping and parsing attributes 110 while next_byte != IPPTags.END_OF_ATTRIBUTES_TAG:113 while next_byte != AttributeTags.END: 111 114 112 115 attribute_group_tag = next_byte … … 130 133 logger.debug("name-length : %i" % name_length) 131 134 132 if name_length != IPPTags.ZERO_NAME_LENGTH:135 if name_length != AttributeTags.ZERO_NAME_LENGTH: 133 136 # read the name (a string of name_length bytes) 134 137 name = request.read(name_length) … … 209 212 210 213 # conver the end-of-attributes-tag to binary 211 end_of_attributes_tag = struct.pack('>b', IPPTags.END_OF_ATTRIBUTES_TAG)214 end_of_attributes_tag = struct.pack('>b', AttributeTags.END) 212 215 213 216 # convert the data to binary
Note: See TracChangeset
for help on using the changeset viewer.