Les premiers switchs s'appellent batX-0 au lieu de batX

darcs-hash:20050418174021-41617-e54c83abc36848ce110f80d601451b781894e6a6.gz
This commit is contained in:
pauget 2005-04-18 19:40:21 +02:00
parent 289c94880e
commit 6e6787e989
2 changed files with 2 additions and 6 deletions

View file

@ -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

View file

@ -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])