From 13308a6880608454906ac2f1d87a8e39f87ef48c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 25 Oct 2012 02:36:35 +0200 Subject: enable --F and --f without argument, this way you can get any random extrapony by ending the commmand line with just --F --- ponysay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ponysay.py') diff --git a/ponysay.py b/ponysay.py index de6997a..51f8c72 100755 --- a/ponysay.py +++ b/ponysay.py @@ -319,13 +319,13 @@ class Ponysay(): ponies[pony] = ponydir + ponyfile ## Support for explicit pony file names - if not names == None: + if names is not None: for name in names: if os.path.exists(name): ponies[name] = name ## If there is not select ponies, choose all of them - if names == None: + if (names is None) or (len(names) == 0): names = list(ponies.keys()) ## Select a random pony of the choosen onles -- cgit