Changeset 569c377


Ignore:
Timestamp:
Mar 10, 2011, 2:04:52 AM (13 years ago)
Author:
Quentin Smith <quentin@…>
Branches:
no-cups
Children:
7a1c039
Parents:
0e5cdb3
git-author:
Quentin Smith <quentin@…> (03/10/11 02:04:52)
git-committer:
Quentin Smith <quentin@…> (03/10/11 02:04:52)
Message:

Err, make it work

Location:
server/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • server/lib/ippattribute.py

    r75c0cab r569c377  
    6464        for value in values:
    6565            assert isinstance(value, Value), \
    66                    "Value must be of type Value"
     66                   "Value %r must be of type Value" % (value)
    6767
    6868        self.name = name
  • server/lib/ippattributegroup.py

    ra76f440 r569c377  
    3434
    3535        if attribute_group_tag is not None:
    36             assert isinstance(attribute_group_tag, char), \
     36            assert isinstance(attribute_group_tag, int), \
    3737                   "attribute_group_tag must be a character!"
    3838           
    3939
    4040        self.attribute_group_tag = attribute_group_tag
    41         self.attributes[]
     41        self.attributes = []
    4242        self.extend(attributes)
    4343
  • server/lib/ipprequest.py

    r0e5cdb3 r569c377  
    55from ippattribute import Attribute
    66from ippvalue import Value
     7from ippconstants import *
    78
    89# initialize logger
  • server/lib/ippvalue.py

    ra6a1f43 r569c377  
    9999            value = struct.unpack('>i', packed_value)[0]
    100100        elif value_tag == IntegerTags.BOOLEAN:
    101             value = struct.unpack('>?', packed_value)[0]
     101            value = struct.unpack('>b', packed_value)[0]
    102102        elif value_tag == IntegerTags.ENUM:
    103103            value = struct.unpack('>i', packed_value)[0]
     
    196196            packed_value = struct.pack('>i', self.value)
    197197        elif self.value_tag == IntegerTags.BOOLEAN:
    198             packed_value = struct.pack('>?', self.value)
     198            packed_value = struct.pack('>b', self.value)
    199199        elif self.value_tag == IntegerTags.ENUM:
    200200            packed_value = struct.pack('>i', self.value)
Note: See TracChangeset for help on using the changeset viewer.