gget r125 - trunk/gget



Author: johans
Date: Thu Nov  6 09:48:43 2008
New Revision: 125
URL: http://svn.gnome.org/viewvc/gget?rev=125&view=rev

Log:
Use XDG base dir for config files.

Modified:
   trunk/gget/config.py

Modified: trunk/gget/config.py
==============================================================================
--- trunk/gget/config.py	(original)
+++ trunk/gget/config.py	Thu Nov  6 09:48:43 2008
@@ -125,6 +125,8 @@
                      KEY_PROXY_FTP_PORT:   'int'
                      }
 
+XDG_CONFIG_DIR = os.getenv("XDG_CONFIG_HOME") or "~/.config"
+
 class Configuration(object):
     """Singleton representing the configuration"""
 
@@ -138,7 +140,8 @@
 
     def __init(self, *args):
         self.debug = args[0] or os.getenv("GGET_DEBUG")
-        self.base_dir = os.path.expanduser("~/.gnome2/gget")
+        self.base_dir = os.path.expanduser(os.path.join(XDG_CONFIG_DIR,
+            "gget"))
         if not os.path.exists(self.base_dir):
             os.makedirs(self.base_dir)
 



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