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))))
|
defaultgroups=set(map(''.join, list(itertools.product(defaultmembers,repeat=i))))
|
||||||
freegroups = list(defaultgroups-currentgroups)
|
freegroups = list(defaultgroups-currentgroups)
|
||||||
if freegroups:
|
if freegroups:
|
||||||
random.shuffle(freegroups)
|
self.groupentry.set_text(random.choice(freegroups))
|
||||||
self.groupentry.set_text(freegroups.pop())
|
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
self.groupentry.set_text('')
|
self.groupentry.set_text('')
|
||||||
|
|
Loading…
Reference in New Issue