(self, s, partial=False)
| 496 | pgid, in form N.xxx (N = pool number, xxx = hex pgnum) |
| 497 | """ |
| 498 | def valid(self, s, partial=False): |
| 499 | if s.find('.') == -1: |
| 500 | raise ArgumentFormat('pgid has no .') |
| 501 | poolid_s, pgnum_s = s.split('.', 1) |
| 502 | try: |
| 503 | poolid = int(poolid_s) |
| 504 | except ValueError: |
| 505 | raise ArgumentFormat('pool {0} not integer'.format(poolid_s)) |
| 506 | if poolid < 0: |
| 507 | raise ArgumentFormat('pool {0} < 0'.format(poolid)) |
| 508 | try: |
| 509 | pgnum = int(pgnum_s, 16) |
| 510 | except ValueError: |
| 511 | raise ArgumentFormat('pgnum {0} not hex integer'.format(pgnum_s)) |
| 512 | self.val = s |
| 513 | |
| 514 | def __str__(self): |
| 515 | return '<pgid>' |
nothing calls this directly
no test coverage detected