Changeset adb4cb46c5ea63d0af984fa8dde33d05278974eb
- Timestamp:
- 07/03/10 19:09:45 (2 months ago)
- Author:
- John M. Schanck <john@…>
- Parents:
- 33c1e034855f33ccfb401ac878455d2b88da1600
- Children:
- 5a262bb2267d42fb6c87f513fbc38b8a798cb0fe
- git-committer:
- John M. Schanck <john@anomos.info> / 2010-07-03T15:09:45Z-0400
- Message:
-
Verify failedpeer lenght
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r2b7540a
|
radb4cb4
|
|
| 37 | 37 | from Anomos.parseargs import parseargs, formatDefinitions |
| 38 | 38 | from Anomos.parsedir import parsedir |
| | 39 | from Anomos.protocol import HDR_NID_LEN |
| 39 | 40 | from Anomos import bttime, version, is_valid_ipv4, LOG as log |
| 40 | 41 | |
| … |
… |
|
| 465 | 466 | if params('event') not in ['started', 'completed', 'stopped', None]: |
| 466 | 467 | raise ValueError('invalid event') |
| | 468 | failed = params('failed') |
| | 469 | if failed and (len(failed) % HDR_NID_LEN) != 0: |
| | 470 | raise ValueError('invalid failed peers list') |
| 467 | 471 | port = int(params('port',-1)) |
| 468 | 472 | if not (0 < port < 65535): |