Changeset b01b6d1 for server/lib/gutenbach/ipp/core/errors.py
- Timestamp:
- Jan 11, 2012, 12:51:51 AM (12 years ago)
- Branches:
- no-cups
- Children:
- be6ff03
- Parents:
- ffbe41d
- git-author:
- Jessica B. Hamrick <jhamrick@…> (01/11/12 00:51:51)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (01/11/12 00:51:51)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/gutenbach/ipp/core/errors.py
r1037115 rb01b6d1 43 43 44 44 45 from .constants import ErrorCodes 45 from .constants import ErrorCodes, AttributeTags 46 from .attributegroup import AttributeGroup 46 47 47 48 class IPPException(Exception): … … 106 107 def __init__(self, message, attrs): 107 108 self.message = message 108 self.bad_attrs = attrs 109 if hasattr(attrs, '__iter__'): 110 self.bad_attrs = attrs 111 else: 112 self.bad_attrs = [attrs] 109 113 110 114 def update_response(self, response): 111 pass 115 super(ClientErrorAttributes, self).update_response(response) 116 response.attribute_groups.append( 117 AttributeGroup( 118 AttributeTags.UNSUPPORTED, 119 self.bad_attrs)) 112 120 113 121 class ClientErrorUriSchemeNotSupported(IPPClientException):
Note: See TracChangeset
for help on using the changeset viewer.