Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-12-24 14:01:10 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-12-24 14:01:10 (GMT)
commited61f48fb661ce452d4a121a1b1a09d5119e6ffa (patch)
treecef0d9db892fabe2a925eaff1e80ae5f6472def4
parent9b71a613f686965e902adf73291c9a76bda89cdb (diff)
media type tests use lower()
-rwxr-xr-x[-rw-r--r--]TurtleArt/tautils.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/TurtleArt/tautils.py b/TurtleArt/tautils.py
index e79d11c..c66b322 100644..100755
--- a/TurtleArt/tautils.py
+++ b/TurtleArt/tautils.py
@@ -301,24 +301,24 @@ def image_to_base64(pixbuf, activity):
def movie_media_type(name):
""" Is it movie media? """
- return name.endswith(('.ogv', '.vob', '.mp4', '.wmv', '.mov', '.mpeg',
- 'ogg'))
+ return name.lower().endswith(('.ogv', '.vob', '.mp4', '.wmv', '.mov',
+ '.mpeg', 'ogg'))
def audio_media_type(name):
""" Is it audio media? """
- return name.endswith(('.oga', '.m4a'))
+ return name.lower().endswith(('.oga', '.m4a'))
def image_media_type(name):
""" Is it image media? """
- return name.endswith(('.png', '.jpg', '.jpeg', '.gif', '.tiff', '.tif',
- '.svg'))
+ return name.lower().endswith(('.png', '.jpg', '.jpeg', '.gif', '.tiff',
+ '.tif', '.svg'))
def text_media_type(name):
""" Is it text media? """
- return name.endswith(('.txt', '.py', '.lg', '.rtf', '.ta'))
+ return name.lower().endswith(('.txt', '.py', '.lg', '.rtf', '.ta'))
def round_int(num):