- if match is None: continue
- standing = match.group(1)
- skills[duty] = standing
-
-# print `duty`, `standing`
-# if standing not in standings: continue
-# for i in range(0, len(standings)):
-# print `duty`, `standing`, i
-# if standing == standings[i]:
-# print `skills[duty]`
-# skills[duty].append(i)
-
-# self.skills = { }
-# for skill in duties:
-
- self.skills = skills
+ if match is None:
+ self._logsoup(key, 'duty "%s" unparseable'+
+ ' standing "%s"' % (duty, valstr))
+ continue
+ standing = match.group(match.lastindex)
+ skills[duty].append(standing)
+
+ self.skills = { }
+
+ for duty in duties:
+ sl = skills[duty]
+ if len(sl) > 1:
+ self.log('duty "%s" multiple standings %s' %
+ (duty, `sl`))
+ continue
+ if not len(sl):
+ self.log('duty "%s" no standing found' % duty)
+ continue
+ standing = sl[0]
+ for i in range(0, len(standings)):
+ if standing == standings[i]:
+ self.skills[duty] = i
+ if not duty in self.skills:
+ self.log('duty "%s" unknown standing "%s"' %
+ (duty, standing))
+ all_skills_ok = True
+ for duty in duties:
+ if not duty in self.skills:
+ all_skills_ok = False
+ if all_skills_ok:
+ self.msgs = [ ]
+