gotta explicitly split on ' ' since we use \n as a delimiter

This commit is contained in:
James Vega 2004-08-25 19:13:35 +00:00
parent bc40ff9d78
commit ba7b018078

View File

@ -136,7 +136,7 @@ class DbmMarkovDB(object):
def getFollower(self, channel, first, second): def getFollower(self, channel, first, second):
db = self._getDb(channel) db = self._getDb(channel)
followers = db[self._combine(first, second)] followers = db[self._combine(first, second)]
follower = random.choice(followers.split()) follower = random.choice(followers.split(' '))
return (follower, follower == '\n') return (follower, follower == '\n')
def firsts(self, channel): def firsts(self, channel):