aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-10-22 12:25:01 +0200
committerMattias Andrée <maandree@operamail.com>2012-10-22 12:25:01 +0200
commit45c3d2a1aa8f68525317933689541274926942f7 (patch)
treeedfcc70cbb081b5880efa7e5aa86534564089103
parent5aa773ef93e1571cc1a10bb9a2c5bcdf56484466 (diff)
downloadponysay-45c3d2a1aa8f68525317933689541274926942f7.tar.gz
ponysay-45c3d2a1aa8f68525317933689541274926942f7.tar.bz2
ponysay-45c3d2a1aa8f68525317933689541274926942f7.zip
m
-rwxr-xr-xponysay.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ponysay.py b/ponysay.py
index 90de92d..6e8b82c 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
'''