(cls, arg)
| 947 | |
| 948 | @classmethod |
| 949 | def check(cls, arg): |
| 950 | if not isinstance(arg, str): |
| 951 | raise ArgumentError(arg, 'Argument is not string') |
| 952 | if len(arg) > cls.length: |
| 953 | raise ArgumentError(arg, 'String longer than %d' % cls.length) |
| 954 | if '\0' in arg: |
| 955 | raise ArgumentError(arg, 'String contains zero-byte') |
| 956 | |
| 957 | @classmethod |
| 958 | def encode(cls, arg): |
no test coverage detected