diff --git a/gestion/annuaires.py b/gestion/annuaires.py index be405bb5..b51ffce0 100755 --- a/gestion/annuaires.py +++ b/gestion/annuaires.py @@ -511,10 +511,7 @@ def all_switchs(bat=None): dup = map(lambda x: x[0], reverse(b).keys()) # dup contient des elements en double for n in list(dict(zip(dup,[None]*len(dup)))): - if int(n) == 0: - switchs.append("bat%s" % b) - else: - switchs.append("bat%s-%s" % (b, n)) + switchs.append("bat%s-%s" % (b, n)) switchs.sort() return switchs diff --git a/gestion/hptools.py b/gestion/hptools.py index 6c26477a..99324821 100644 --- a/gestion/hptools.py +++ b/gestion/hptools.py @@ -424,8 +424,7 @@ class sw_chbre(hpswitch) : self.prise_brute = prise self.switch = 'bat%s' % bat num_switch = int(prise[0]) - if num_switch != 0 : - self.switch += '-%i' % num_switch + self.switch += '-%i' % num_switch if prise[-1] == '-' : #Prise en 10 self.prise = int(prise[1:-1])