Merge pull request #132 from DanAlbert/fix-radio-reservation

Ensure that allocated channels are reserved.
This commit is contained in:
C. Perreau 2020-09-12 22:35:00 +02:00 committed by GitHub
commit 8a8a835a32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,6 +189,7 @@ class RadioRegistry:
try:
while (channel := next(allocator)) in self.allocated_channels:
pass
self.reserve(channel)
return channel
except StopIteration:
raise OutOfChannelsError(radio)