From 45c3d2a1aa8f68525317933689541274926942f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Mon, 22 Oct 2012 12:25:01 +0200 Subject: [PATCH] m --- ponysay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ponysay.py b/ponysay.py index 90de92d8..6e8b82c3 100755 --- a/ponysay.py +++ b/ponysay.py @@ -2130,8 +2130,8 @@ linuxvt = ('TERM' in os.environ) and (os.environ['TERM'] == 'linux') ''' Whether the script is executed as ponythink ''' -isthink = (len(__file__) >= 5) and (__file__[-5:] == 'think') -isthink = ((len(__file__) >= 8) and (__file__[-8:] == 'think.py')) or isthink +isthink = (len(__file__) >= len('think')) and (__file__.endswith('think')) +isthink = ((len(__file__) >= len('think.py')) and (__file__.endswith('think.py'))) or isthink '''