Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2012-12-18 16:04:40 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2012-12-18 16:44:06 (GMT)
commit1dd2aec650ac4c185fc8479007b42ab948e84a43 (patch)
treed3d68b6d3487f0cc9dc4ef66a1b772909ad91ad9
parent5b438e797a37fddddfde9dcc35fff23be5e01006 (diff)
get_mime_description, use Gio from dynamic bindings - SL #4323 #4307
'import gio' was importing static gobject, and mixing static and dynamic bindings provoked a crash. Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/sugar3/mime.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sugar3/mime.py b/src/sugar3/mime.py
index 70b4d2b..be9b5eb 100644
--- a/src/sugar3/mime.py
+++ b/src/sugar3/mime.py
@@ -26,6 +26,7 @@ import logging
import gettext
from gi.repository import GdkPixbuf
+from gi.repository import Gio
from sugar3 import _sugarbaseext
@@ -149,8 +150,7 @@ def get_mime_description(mime_type):
if generic_type:
return generic_type['name']
- import gio
- return gio.content_type_get_description(mime_type)
+ return Gio.content_type_get_description(mime_type)
def get_mime_parents(mime_type):