Replace 'raise StopIteration' with a blank 'return', since changes in python-3.7 change StopIeration to a RuntimeError.

This commit is contained in:
Mike Auty
2018-09-28 12:44:19 +01:00
parent 3e176c8a50
commit de3bfad135
9 changed files with 15 additions and 14 deletions
+2 -2
View File
@@ -88,9 +88,9 @@ class SegmentedLayer(interfaces.layers.TranslationLayerInterface, metaclass = AB
current_offset = logical_offset
# If it starts too late then we're done
if logical_offset > offset + length:
raise StopIteration
return
except exceptions.InvalidAddressException:
raise StopIteration
return
# Crop it to the amount we need left
chunk_size = min(size, length + offset - logical_offset)
yield (logical_offset, mapped_offset, chunk_size, self._base_layer)