aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-05-29 01:36:21 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-05-29 02:54:41 +0200
commit2a1a1fa8f93aa217b10f5f0a54c6f0f14f358767 (patch)
treec3ad3afd6eb551aa15ff8fdb565ca05a5546c9ff
parent48055ed0aa1c6997e0efd3b9bd85efa1a4311ec6 (diff)
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
-rw-r--r--src/osmo_gsm_tester/resource.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index b146ebd..8520612 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -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))