Ignore:
Timestamp:
Mar 5, 2011, 7:14:21 PM (13 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
no-cups
Children:
16055f9
Parents:
574aee4
git-author:
Jessica B. Hamrick <jhamrick@…> (03/05/11 19:14:21)
git-committer:
Jessica B. Hamrick <jhamrick@…> (03/05/11 19:14:21)
Message:

get-jobs response in GutenbachIPPserver

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/ipprequest.py

    r89fe6da rc5e88d0  
    6969    """
    7070
    71     def __init__(self, value_tag, value):
     71    def __init__(self, value_tag, value, unpack=True):
    7272        """
    7373        Initialize an IPPValue:
     
    8787        self.value_tag = value_tag
    8888        self.value = value
     89
     90        if not unpack: return
    8991
    9092        # out-of-band value tags
     
    378380        self.attributes = attributes
    379381
     382    def getAttribute(self, name):
     383        return filter(lambda x: x.name == name, self.attributes)
     384
    380385    def toBinaryData(self):
    381386        """
     
    462467            # make sure attribute_groups is a list of IPPAttributes
    463468            assert len(attribute_groups) > 0
    464             for a in attribute_groups: assert isinstance(a, IPPAttribute)
     469            for a in attribute_groups: assert isinstance(a, IPPAttributeGroup)
    465470           
    466471        # if the request isn't None, then we'll read directly from
     
    575580            self.data = data
    576581
     582    def getAttributeGroup(self, tag):
     583        return filter(lambda x: x.attribute_group_tag == tag,
     584                      self.attribute_groups)
     585
    577586    def toBinaryData(self):
    578587        """
Note: See TracChangeset for help on using the changeset viewer.