Change in osmo-gsm-tester[master]: pyflakes: Remove occurrences of using undefined variables

Holger Freyther gerrit-no-reply at lists.osmocom.org
Fri Mar 1 15:09:05 UTC 2019


Holger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/13072 )

Change subject: pyflakes: Remove occurrences of using undefined variables
......................................................................

pyflakes: Remove occurrences of using undefined variables

Mention the attribute right away and remove a method that looks
to have been broken (more vs. more_rules).

Change-Id: Iba18a96ff804780e66c69b459e112f9d42b7b2ff
---
M src/osmo_gsm_tester/bts_nanobts.py
M src/osmo_gsm_tester/resource.py
2 files changed, 1 insertion(+), 6 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Holger Freyther: Verified



diff --git a/src/osmo_gsm_tester/bts_nanobts.py b/src/osmo_gsm_tester/bts_nanobts.py
index 5fe8bae..4cdb98e 100644
--- a/src/osmo_gsm_tester/bts_nanobts.py
+++ b/src/osmo_gsm_tester/bts_nanobts.py
@@ -92,7 +92,7 @@
 
     def start(self, keepalive=False):
         if self.conf.get('ipa_unit_id') is None:
-            raise log.Error('No attribute %s provided in conf!' % attr)
+            raise log.Error('No attribute ipa_unit_id provided in conf!')
         self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name()))
         self._configure()
 
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index 29f641e..98651ce 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -395,11 +395,6 @@
             raise RuntimeError('adding a list of resources to itself?')
         config.add(self, copy.deepcopy(more))
 
-    def combine(self, more_rules):
-        if more_rules is self:
-            raise RuntimeError('combining a list of resource rules with itself?')
-        config.combine(self, copy.deepcopy(more))
-
     def mark_reserved_by(self, origin_id):
         for key, item_list in self.items():
             for item in item_list:

-- 
To view, visit https://gerrit.osmocom.org/13072
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iba18a96ff804780e66c69b459e112f9d42b7b2ff
Gerrit-Change-Number: 13072
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190301/6f499735/attachment.html>


More information about the gerrit-log mailing list