mirror of
https://github.com/erkin/ponysay.git
synced 2025-02-07 13:36:43 +01:00
Fallback quote for ponies without quotes
This commit is contained in:
parent
3bb5a68d7f
commit
2301f094ad
1 changed files with 13 additions and 9 deletions
|
@ -349,6 +349,7 @@ class ponysay():
|
|||
alts.append(pair)
|
||||
pairs = alts
|
||||
|
||||
if not len(pairs) == 0:
|
||||
pair = pairs[random.randrange(0, len(pairs))]
|
||||
qfile = None
|
||||
try:
|
||||
|
@ -358,6 +359,9 @@ class ponysay():
|
|||
if qfile is not None:
|
||||
qfile.close()
|
||||
args.pony = [pair[0]]
|
||||
else:
|
||||
args.pony = args.quote
|
||||
args.message = 'I got nuthin\' good to say :('
|
||||
|
||||
self.print_pony(args)
|
||||
|
||||
|
|
Loading…
Reference in a new issue