Better random selection of default group name from pool
This commit is contained in:
parent
64749ffa4f
commit
0515144a9a
@ -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('')
|
||||
|
Loading…
Reference in New Issue
Block a user