commit | 9b90770716032c299ef04830ce62fa0942e434a5 | [log] [tgz] |
---|---|---|
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | Sat May 06 23:20:33 2017 +0200 |
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | Mon May 08 10:11:52 2017 +0000 |
tree | ee5835cc6df230c0168f16f3082bcad5a5f2c235 | |
parent | 2fade33e49db7ad0df33074d734d94cf7016e0ee [diff] |
Resource.find: allow returning empty instead of raising Add flag raise_if_missing, and if False, instead of raising an exception, return an empty list for that kind of resource. This makes sense for a caller that requests a single resource. When finding a single resource to use in ReservedResources.get(), use this to raise a more adequate exception message if none was found. Change-Id: Ia296ea68a787bede037a6cea38563b570fb0766e