Update of /cvsroot/pybot/pybot/pybot/modules
In directory sc8-pr-cvs1:/tmp/cvs-serv4173/pybot/modules
Modified Files:
infopack.py
Log Message:
* contrib/vera2info.py: Updated to add multiple values in the
same key, when the keys are the same.
* data/infopacks/vera.info: Updated to vera 1.9.
Index: infopack.py
===================================================================
RCS file: /cvsroot/pybot/pybot/pybot/modules/infopack.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** infopack.py 12 May 2003 20:42:21 -0000 1.5
--- infopack.py 16 May 2003 17:28:03 -0000 1.6
***************
*** 18,22 ****
from pybot import config, hooks, mm, db
! from random import randrange
import re
import os
--- 18,22 ----
from pybot import config, hooks, mm, db
! import random
import re
import os
***************
*** 157,163 ****
values = self.getinfo(key)
if values:
! value = values[randrange(len(values))]
elif self._defaults:
! value = self._defaults[randrange(len(self._defaults))]
else:
break
--- 157,163 ----
values = self.getinfo(key)
if values:
! value = random.choice(values)
elif self._defaults:
! value = random.choice(self._defaults)
else:
break
***************
*** 168,172 ****
info.tonick = "t" in flags
if "m" in flags:
! mask = self._masks[randrange(len(self._masks))]
info.phrase = mask%value[1]
else:
--- 168,172 ----
info.tonick = "t" in flags
if "m" in flags:
! mask = random.choice(self._masks)
info.phrase = mask%value[1]
else:
|