Changeset c5e88d0 for server/lib/ipprequest.py
- Timestamp:
- Mar 5, 2011, 7:14:21 PM (14 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/ipprequest.py
r89fe6da rc5e88d0 69 69 """ 70 70 71 def __init__(self, value_tag, value ):71 def __init__(self, value_tag, value, unpack=True): 72 72 """ 73 73 Initialize an IPPValue: … … 87 87 self.value_tag = value_tag 88 88 self.value = value 89 90 if not unpack: return 89 91 90 92 # out-of-band value tags … … 378 380 self.attributes = attributes 379 381 382 def getAttribute(self, name): 383 return filter(lambda x: x.name == name, self.attributes) 384 380 385 def toBinaryData(self): 381 386 """ … … 462 467 # make sure attribute_groups is a list of IPPAttributes 463 468 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) 465 470 466 471 # if the request isn't None, then we'll read directly from … … 575 580 self.data = data 576 581 582 def getAttributeGroup(self, tag): 583 return filter(lambda x: x.attribute_group_tag == tag, 584 self.attribute_groups) 585 577 586 def toBinaryData(self): 578 587 """
Note: See TracChangeset
for help on using the changeset viewer.