Ignore:
Timestamp:
Mar 5, 2011, 10:36:40 PM (13 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
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)
Message:

Update references to IPPTags and add import statements for IPPAttribute, IPPAttributeGroup, IPPValue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/ipprequest.py

    r8979f90 r2646571  
    22
    33import sys, struct, logging
     4from ippattributegroup import IPPAttributeGroup
     5from ippattribute import IPPAttribute
     6from ippvalue import IPPValue
    47
    58# initialize logger
     
    108111            # as long as the next byte isn't signaling the end of the
    109112            # attributes, keep looping and parsing attributes
    110             while next_byte != IPPTags.END_OF_ATTRIBUTES_TAG:
     113            while next_byte != AttributeTags.END:
    111114               
    112115                attribute_group_tag = next_byte
     
    130133                    logger.debug("name-length : %i" % name_length)
    131134                   
    132                     if name_length != IPPTags.ZERO_NAME_LENGTH:
     135                    if name_length != AttributeTags.ZERO_NAME_LENGTH:
    133136                        # read the name (a string of name_length bytes)
    134137                        name          = request.read(name_length)
     
    209212
    210213        # 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)
    212215
    213216        # convert the data to binary
Note: See TracChangeset for help on using the changeset viewer.