summaryrefslogtreecommitdiff
path: root/cesar/maximus/python/tools/csi/csiavln.py
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/maximus/python/tools/csi/csiavln.py')
-rw-r--r--cesar/maximus/python/tools/csi/csiavln.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/cesar/maximus/python/tools/csi/csiavln.py b/cesar/maximus/python/tools/csi/csiavln.py
index 1989b492b5..01b3190abd 100644
--- a/cesar/maximus/python/tools/csi/csiavln.py
+++ b/cesar/maximus/python/tools/csi/csiavln.py
@@ -30,17 +30,20 @@ class csiAvln:
if self.__hp_sta_max <= self.get_nb_sta():
return None
+ if len (dpw) < 16 or len (dpw) > 64:
+ raise Exception ("Device password wrong length, must be at least 16 characters at most 64")
+
for i in range (0, self.get_nb_sta()):
if (self.get_sta(i).get_mac_addr() == mac_addr):
return None
- if len (self.__sta_list) > 0:
- if self.__sta_list[len(self.__sta_list) -1].get_delay_ms() > delay_ms:
- raise Exception ('Delay value smaller than the previous station delay')
+ if len (self.__sta_list) > 0:
+ if self.__sta_list[len(self.__sta_list) -1].get_delay_ms() > delay_ms:
+ raise Exception ('Delay value smaller than the previous station delay')
- sta = csiSta (mac_addr, cco_pref, was_cco, self.get_npw(), dpw, mhfid, uhfid, self.get_ahfid(), sl, debug, delay_ms)
- self.__sta_list.append (sta)
- return sta
+ sta = csiSta (mac_addr, cco_pref, was_cco, self.get_npw(), dpw, mhfid, uhfid, self.get_ahfid(), sl, debug, delay_ms)
+ self.__sta_list.append (sta)
+ return sta
def sta_remove (self, mac_addr):