'check if user add security password on AP'

def checkWirelessSecurity(self):

    if self.GroupApPassphrase.isChecked():
        self.confgSecurity = []
        if (1 <= self.WPAtype_spinbox.value() <= 2):
            self.confgSecurity.append('wpa={}\n'.format(str(self.WPAtype_spinbox.value())))
            self.confgSecurity.append('wpa_key_mgmt=WPA-PSK\n')
            self.confgSecurity.append('wpa_passphrase={}\n'.format(self.editPasswordAP.text()))
            if ('+' in self.wpa_pairwiseCB.currentText()):
                self.confgSecurity.append('wpa_pairwise=TKIP    CCMP\n')
            else:
                self.confgSecurity.append('wpa_pairwise={}\n'.format(self.wpa_pairwiseCB.currentText()))
        if (self.WPAtype_spinbox.value() == 0):
            self.confgSecurity.append('auth_algs=1\n')
            self.confgSecurity.append('wep_default_key=0\n')
            if ((len(self.editPasswordAP.text()) == 5) or (len(self.editPasswordAP.text()) == 13)):
                self.confgSecurity.append('wep_key0="{}"\n'.format(self.editPasswordAP.text()))
            else:
                self.confgSecurity.append('wep_key0={}\n'.format(self.editPasswordAP.text()))
        for config in self.confgSecurity:
            self.SettingsAP['hostapd'].append(config)
        self.FSettings.Settings.set_setting('accesspoint', 'WPA_SharedKey', self.editPasswordAP.text())
        self.FSettings.Settings.set_setting('accesspoint', 'WPA_Algorithms', self.wpa_pairwiseCB.currentText())
        self.FSettings.Settings.set_setting('accesspoint', 'WPA_type', self.WPAtype_spinbox.value())
