diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/rpki/resource_set.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/rpki/resource_set.py b/scripts/rpki/resource_set.py index 64b18b6f..8497dad5 100644 --- a/scripts/rpki/resource_set.py +++ b/scripts/rpki/resource_set.py @@ -221,6 +221,10 @@ class resource_set(list): if this.max > that.max: max = this.max else: max = that.max result.append(type(this)(min, max)) + for i in range(len(result) - 2, -1, -1): + if result[i].max + 1 == result[i + 1].min: + result[i].max = result[i + 1].max + result.pop(i + 1) return type(self)(result) def intersection(self, other): |