Changeset a6a1f43 for server


Ignore:
Timestamp:
Mar 10, 2011, 12:41:02 AM (13 years ago)
Author:
Quentin Smith <quentin@…>
Branches:
no-cups
Children:
75c0cab
Parents:
fc427ef
git-author:
Quentin Smith <quentin@…> (03/10/11 00:41:02)
git-committer:
Quentin Smith <quentin@…> (03/10/11 00:41:02)
Message:

Python <2.6 doesn't have the convenience method property.setter, so instead we'll use a function that emulates it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/ippvalue.py

    rfa0d0ef ra6a1f43  
    66# initialize logger
    77logger = logging.getLogger("ippLogger")
     8
     9def setter(prop):
     10    def f(func):
     11        return property(prop.fget, func, prop.fdel, prop.__doc__)
     12    return f
    813
    914class Value(object):
     
    265270        return packed_value
    266271
    267     @packed_value.setter
    268     def set_packed_value(self, packed_value):
     272    @setter(packed_value)
     273    def packed_value(self, packed_value):
    269274        """Replace a value using a new packed value
    270275
Note: See TracChangeset for help on using the changeset viewer.