Changeset ebf327d for server/lib/ippattributegroup.py
- Timestamp:
- Mar 5, 2011, 10:42:40 PM (14 years ago)
- Branches:
- no-cups
- Children:
- 5cfb358
- Parents:
- cf1d291
- git-author:
- Jessica B. Hamrick <jhamrick@…> (03/05/11 22:42:40)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (03/05/11 22:42:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/ippattributegroup.py
r2646571 rebf327d 2 2 3 3 import sys, struct, logging 4 from ippattribute import IPPAttribute4 from ippattribute import Attribute 5 5 6 6 # initialize logger 7 7 logger = logging.getLogger("ippLogger") 8 8 9 class IPPAttributeGroup():9 class AttributeGroup(): 10 10 """ 11 An IPPAttributeGroup consists of an attribute-group-tag, followed12 by a sequence of IPPAttributes.11 An AttributeGroup consists of an attribute-group-tag, followed by 12 a sequence of Attributes. 13 13 """ 14 14 15 15 def __init__(self, attribute_group_tag, attributes=[]): 16 16 """ 17 Initialize an IPPAttributeGroup.17 Initialize an AttributeGroup. 18 18 19 19 Arguments: … … 28 28 assert attribute_group_tag is not None 29 29 30 # make sure attributes is a list or tuple of IPPAttributes30 # make sure attributes is a list or tuple of Attributes 31 31 assert isinstance(attributes, (list, tuple)) 32 for a in attributes: assert isinstance(a, IPPAttribute)32 for a in attributes: assert isinstance(a, Attribute) 33 33 34 34 self.attribute_group_tag = attribute_group_tag … … 40 40 def toBinaryData(self): 41 41 """ 42 Convert the IPPAttributeGroup to binary.42 Convert the AttributeGroup to binary. 43 43 """ 44 44
Note: See TracChangeset
for help on using the changeset viewer.