[PATCH] osmo-gsm-tester[master]: resource: Allow passing keyword args to NoResourceExn

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Sep 15 13:53:15 UTC 2017


Hello Neels Hofmeyr, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/3954

to look at the new patch set (#3).

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
---
M src/osmo_gsm_tester/resource.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/54/3954/3

diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index f1697ea..7e55129 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -208,7 +208,7 @@
             return next_msisdn
 
 
-class NoResourceExn(Exception):
+class NoResourceExn(log.Error):
     pass
 
 class Resources(dict):

-- 
To view, visit https://gerrit.osmocom.org/3954
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic960ae8db5372b0a4640356f0b4820ed42477b46
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list