fix: None error on unavailable resources

If not a single resource of a wanted item was left, we ran into a None. Report
unavailability instead.

Change-Id: Ie1849a74cb227964e7c3ac06852582baa2333697
This commit is contained in:
Neels Hofmeyr 2017-05-29 01:36:21 +02:00
parent 48055ed0aa
commit 2a1a1fa8f9
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ class Resources(dict):
# here we have a resource of a given type, e.g. 'bts', with a list
# containing as many BTSes as the caller wants to reserve/use. Each
# list item contains specifics for the particular BTS.
my_list = self.get(key)
my_list = self.get(key, [])
for_origin.log(log_label, len(want_list), 'x', key, '(candidates: %d)'%len(my_list))