Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/olpc/datastore/model.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/olpc/datastore/model.py')
-rw-r--r--src/olpc/datastore/model.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/olpc/datastore/model.py b/src/olpc/datastore/model.py
index 6eed2a5..773fdcf 100644
--- a/src/olpc/datastore/model.py
+++ b/src/olpc/datastore/model.py
@@ -11,10 +11,10 @@ __copyright__ = 'Copyright ObjectRealms, LLC, 2007'
__license__ = 'The GNU Public License V2+'
import datetime
-import mimetypes
import os
import time
import warnings
+from sugar import mime
from olpc.datastore.utils import timeparse
@@ -249,7 +249,7 @@ class Content(object):
# try to get an extension from the mimetype if available
mt = self.get_property('mime_type', None)
if mt:
- ext = mimetypes.guess_extension(mt)
+ ext = mime.get_primary_extension(mt)
# .ksh is a strange ext for plain text
if ext and ext == '.ksh': ext = '.txt'
if ext: return None, ext