]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: fst_test_common: Remove dead code from HapdRegCtrl
authorJohannes Berg <johannes.berg@intel.com>
Tue, 11 May 2021 19:35:40 +0000 (21:35 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 25 Aug 2021 13:20:17 +0000 (16:20 +0300)
Since refcnt is never incremented, this is dead code, just remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
tests/hwsim/fst_test_common.py

index 4b6bab07d7803ae5bb9bb7f934408107cf017e72..440d65f9f3fdaa5dc04edb0b734648295817bb71 100644 (file)
@@ -24,14 +24,9 @@ fst_test_def_reg_domain = '00'
 
 class HapdRegCtrl:
     def __init__(self):
-        self.refcnt = 0
         self.ifname = None
         self.changed = False
 
-    def __del__(self):
-        if self.refcnt != 0 and self.changed == True:
-            self.restore_reg_domain()
-
     def start(self):
         if self.ifname != None:
              hapd = hostapd.Hostapd(self.ifname)