[transmageddon] Change utils.py over to glib from xdg as I use glib elsewhere anyway



commit 7a36e609a43b2ead903d1504482a81e3809c3be7
Author: Christian Fredrik Kalager Schaller <christian schaller collabora co uk>
Date:   Fri Dec 9 14:31:48 2011 +0000

    Change utils.py over to glib from xdg as I use glib elsewhere anyway

 src/utils.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/utils.py b/src/utils.py
index 4351602..bd9c10e 100644
--- a/src/utils.py
+++ b/src/utils.py
@@ -28,7 +28,7 @@ import gettext
 import logging
 import os
 import sys
-import xdg.BaseDirectory
+import glib
 
 _ = gettext.gettext
 
@@ -39,11 +39,12 @@ def get_search_paths():
         @rtype: list
         @return: A list of paths to search in the order they will be searched
     """
+    userconfig=glib.get_user_config_dir()
     return [
-        xdg.BaseDirectory.save_data_path("transmageddon"),
+        userconfig,
         os.getcwd(),
         os.path.join(os.getcwd(), ".."),
-        os.path.expanduser(os.path.join("~", ".transmageddon")),
+        os.path.expanduser(os.path.join(userconfig, "transmageddon")),
         os.path.join(sys.prefix, "share", "transmageddon"),
         os.path.join(sys.prefix, "local", "share", "transmageddon"),
     ]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]