diff --git a/gestion/gest_crans.py b/gestion/gest_crans.py index 8fe3e6fb..233a8858 100755 --- a/gestion/gest_crans.py +++ b/gestion/gest_crans.py @@ -2676,18 +2676,11 @@ def menu_principal(): try: if choix == 'Fixe': becane = MachineFixe(proprio) - #Saisie prédictive de la mac - try: - prise = proprio.chbre().lower()[0] + becane.prise() - becane.ip("", lock=False) - f = open('/usr/scripts/var/last_macs/' + prise, 'r') - becane.mac(f.read(), lock=False) - f.close() - except: - pass - elif choix == 'Wifi': becane = MachineWifi(proprio) + # Suggestion: ne pas relever la mac + if choix == 'Wifi' or (choix == 'Fixe' and proprio.chbre() not in ['', 'EXT']): + becane.mac("") except ValueError, c: arg = u'--title "Nouvelle machine" ' arg += u'--msgbox "%s\n\n\n" 0 0' % to_unicode(c.args[0]) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 51262d96..0578d486 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -3029,8 +3029,9 @@ class Machine(BaseClasseCrans): mac = format_mac(mac) if mac == '': - multi_ok = True - lock = False + self._set('macAddress', [mac]) + self.ipv6('') + return mac # La MAC serait-elle une MAC à la con ? if mac == "00:04:4b:80:80:03":