path: root/src/osmo_gsm_tester/sms.py
diff options
authorPau Espin Pedrol <pespin@sysmocom.de>2018-08-09 13:45:55 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-08-13 07:51:58 +0000
commit58603671c21b0af30d0d52fec862c5843c6e50d0 (patch)
treecb7f8b4fb0fca3e7895d8ffcab8c8a3cf91d1537 /src/osmo_gsm_tester/sms.py
parent6caa5c11674d8b0041939b3488c8d9a517edc805 (diff)
Cleanup of class scoped variables
After bug described in OS#3456 and fixed in last commit, let's categorize and place variables in its correct plac to avoid similar issus. We leave under the class keyword (class scoped variables) the attributes which are to be used as static class attributes. All other ones are initialized during __init__(). This way w avoid scenarios in which while using an object from an instance attribute we end up reading a class scoped variable which is shared among all instances. Change-Id: I5ad4cac34a9f49eaf42966c01c9c5a4d3f3e9dc8
Diffstat (limited to 'src/osmo_gsm_tester/sms.py')
1 files changed, 0 insertions, 1 deletions
diff --git a/src/osmo_gsm_tester/sms.py b/src/osmo_gsm_tester/sms.py
index e264b66..0118517 100644
--- a/src/osmo_gsm_tester/sms.py
+++ b/src/osmo_gsm_tester/sms.py
@@ -19,7 +19,6 @@
class Sms:
_last_sms_idx = 0
- msg = None
def __init__(self, src_msisdn=None, dst_msisdn=None, *tokens):
Sms._last_sms_idx += 1