Ignore:
Timestamp:
Dec 23, 2011, 9:04:31 PM (12 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
no-cups
Children:
793432f
Parents:
aded2d1
git-author:
Jessica B. Hamrick <jhamrick@…> (12/23/11 21:04:31)
git-committer:
Jessica B. Hamrick <jhamrick@…> (12/23/11 21:04:31)
Message:

Use classes for standard IPP attributes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/gutenbach/ipp/object_attributes/operation_attributes.py

    raded2d1 rb828a96  
    99from ..constants import *
    1010
    11 class PrinterUri(Attribute):
    12     def __init__(self, val):
    13         super(type(self), self).__init__(
    14             'printer-uri',
    15             [Value(CharacterStringTags.URI, val)])
     11def PrinterUri(val):
     12    return Attribute(
     13        'printer-uri',
     14        [Value(CharacterStringTags.URI, val)])
    1615
    17 class RequestingUserName(Attribute):
    18     def __init__(self, val):
    19         super(type(self), self).__init__(
    20             'requesting-user-name',
    21             [Value(CharacterStringTags.NAME_WITHOUT_LANGUAGE, val)])
     16def RequestingUserName(val):
     17    return Attribute(
     18        'requesting-user-name',
     19        [Value(CharacterStringTags.NAME_WITHOUT_LANGUAGE, val)])
Note: See TracChangeset for help on using the changeset viewer.