Ignore:
Timestamp:
Mar 11, 2011, 1:50:39 PM (14 years ago)
Author:
Quentin Smith <quentin@…>
Branches:
no-cups
Children:
556a285
Parents:
dc37ed0
git-author:
Quentin Smith <quentin@…> (03/11/11 13:50:39)
git-committer:
Quentin Smith <quentin@…> (03/11/11 13:50:39)
Message:

Allow the specification of attribute groups after a request object is created

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/ipp/request.py

    r94211df r1b9d629  
    7878            assert request_id is not None
    7979            # make sure attribute_groups is a list of Attributes
    80             assert len(attribute_groups) > 0
    8180            for a in attribute_groups: assert isinstance(a, AttributeGroup)
    8281           
     
    203202        """
    204203
     204        # make sure the version number isn't empty
     205        assert self.version is not None
     206        # make sure verison is a tuple of length 2
     207        assert isinstance(self.version, tuple)
     208        assert len(self.version) == 2
     209        # make sure the operation id isn't empty
     210        assert self.operation_id is not None
     211        # make sure the request id isn't empty
     212        assert self.request_id is not None
     213        # make sure attribute_groups is a list of Attributes
     214        assert len(self.attribute_groups) > 0
     215        for a in self.attribute_groups: assert isinstance(a, AttributeGroup)
     216
    205217        # convert the version, operation id, and request id to binary
    206218        preattributes = struct.pack('>bbhi',
Note: See TracChangeset for help on using the changeset viewer.