Commit 4766cb7
committed
Avoid OverflowError with large ranges
Use `IpRange.__len__()` directly rather than calling `len(IpRange())` when
computing the length of an IpRangeList. This won't stop OverflowErrors in
calling code such as `len(IpRangeList('fe80::/10'))`, but it will provide
a method to work around the overflow by direct use of `IpRangeList.__len__()`.
Issue: #121 parent f8c4fc6 commit 4766cb7
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| |||
510 | 512 | | |
511 | 513 | | |
512 | 514 | | |
| 515 | + | |
| 516 | + | |
513 | 517 | | |
514 | | - | |
| 518 | + | |
515 | 519 | | |
516 | 520 | | |
517 | 521 | | |
| |||
0 commit comments