resource: Allow passing keyword args to NoResourceExn

Same code is already being used by log.Error exception.

This way we can use:
raise resource.NoResourceExn("No free arfcns in any of bands", bands=supported_bands)

And get:
osmo_gsm_tester.resource.NoResourceExn: No free arfcns in any of bands {bands=['GSM-850', 'GSM-900', 'GSM-1800', 'GSM-1900']}

Change-Id: Ic960ae8db5372b0a4640356f0b4820ed42477b46
This commit is contained in:
Pau Espin 2017-09-14 17:35:03 +02:00 committed by Neels Hofmeyr
parent ac18fd31e7
commit 4676cbd782
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ class ResourcesPool(log.Origin):
return next_msisdn
class NoResourceExn(Exception):
class NoResourceExn(log.Error):
pass
class Resources(dict):