[./gestion/midtools.py] Bugfixes

darcs-hash:20100217194002-8fbb1-cb6835eb0ad4ae9184d5588f0fc71f20a86a8699.gz
This commit is contained in:
Olivier Huber 2010-02-17 20:40:02 +01:00
parent 60f989e392
commit d70bf83e59

View file

@ -41,8 +41,8 @@ class Mid(object):
def parse(self, mid): def parse(self, mid):
self.mid = mid self.mid = mid
self.type = None self.type = None
for tp in config.mid: for tp in config.mid.keys():
if mid <= tp[1] and mid >= tp[0]: if mid <= config.mid[tp][1] and mid >= config.mid[tp][0]:
self.type = tp self.type = tp
if self.type is None: if self.type is None:
raise ValueError("mid inconnu : %d" % mid) raise ValueError("mid inconnu : %d" % mid)