ontv r470 - trunk/ontv
- From: johans svn gnome org
- To: svn-commits-list gnome org
- Subject: ontv r470 - trunk/ontv
- Date: Thu, 6 Nov 2008 23:00:44 +0000 (UTC)
Author: johans
Date: Thu Nov 6 23:00:43 2008
New Revision: 470
URL: http://svn.gnome.org/viewvc/ontv?rev=470&view=rev
Log:
Use XDG base dir for config files.
Modified:
trunk/ontv/config.py
Modified: trunk/ontv/config.py
==============================================================================
--- trunk/ontv/config.py (original)
+++ trunk/ontv/config.py Thu Nov 6 23:00:43 2008
@@ -46,6 +46,8 @@
KEY_DISPLAY_UPCOMING_PROGRAMS: 'bool',
KEY_UPCOMING_PROGRAMS_BELOW: 'bool'}
+XDG_CONFIG_DIR = os.getenv("XDG_CONFIG_HOME") or "~/.config"
+
class Configuration(object):
"""Singleton representing the configuration"""
@@ -58,7 +60,8 @@
return Configuration.instance
def __init(self, *args):
- self.base_dir = os.path.expanduser("~/.gnome2/ontv")
+ self.base_dir = os.path.expanduser(os.path.join(XDG_CONFIG_DIR,
+ "ontv"))
self.logos_dir = os.path.join(self.base_dir, "logos")
if not os.path.exists(self.logos_dir):
os.makedirs(self.logos_dir)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]