Ignore:
Timestamp:
Jan 10, 2012, 7:25:33 PM (12 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
no-cups
Children:
b01b6d1
Parents:
ce2abc5
git-author:
Jessica B. Hamrick <jhamrick@…> (01/10/12 19:25:33)
git-committer:
Jessica B. Hamrick <jhamrick@…> (01/10/12 19:25:33)
Message:

Clean up core ipp code a bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/gutenbach/ipp/core/attributegroup.py

    r793432f rffbe41d  
    3333        """
    3434
    35         if tag is not None:
    36             assert isinstance(tag, int), \
    37                    "tag must be a character!"
     35        if tag is not None and not isinstance(tag, int):
     36            raise ValueError("tag must be a character")
    3837
    3938        self.tag = tag
     
    8786
    8887        for a in attributes:
    89             assert isinstance(a, Attribute), \
    90                    "attribute must be of type Attribute!"
     88            if not isinstance(a, Attribute):
     89                raise ValueError("attribute must be of type Attribute")
    9190
    9291        for a in attributes:
Note: See TracChangeset for help on using the changeset viewer.