Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46ff190 commit 525d52fCopy full SHA for 525d52f
1 file changed
Tools/faqwiz/faqwiz.py
@@ -325,12 +325,6 @@ def parse(self, file):
325
sec, num = self.__okprog.group(1, 2)
326
return string.atoi(sec), string.atoi(num)
327
328
- def roulette(self):
329
- self.__fill()
330
- import whrandom
331
- if not self.__files: return None
332
- return whrandom.choice(self.__files)
333
-
334
def list(self):
335
# XXX Caller shouldn't modify result
336
self.__fill()
@@ -577,10 +571,12 @@ def do_recent(self):
577
571
emit(TAIL_RECENT)
578
572
579
573
def do_roulette(self):
580
- file = self.dir.roulette()
581
- if not file:
574
+ import whrandom
575
+ files = self.dir.list()
576
+ if not files:
582
self.error("No entries.")
583
return
+ file = whrandom.choice(files)
584
self.prologue(T_ROULETTE)
585
self.dir.show(file)
586
0 commit comments