Better random selection of default group name from pool

This commit is contained in:
Stephen Boddy 2012-10-24 18:49:33 +02:00
parent 64749ffa4f
commit 0515144a9a
1 changed files with 1 additions and 2 deletions

View File

@ -247,8 +247,7 @@ class Titlebar(gtk.EventBox):
defaultgroups=set(map(''.join, list(itertools.product(defaultmembers,repeat=i))))
freegroups = list(defaultgroups-currentgroups)
if freegroups:
random.shuffle(freegroups)
self.groupentry.set_text(freegroups.pop())
self.groupentry.set_text(random.choice(freegroups))
break
else:
self.groupentry.set_text('')