Merge lp:~sil/cheers/xdg-folders into lp:~cheers/cheers/trunk

Proposed by Stuart Langridge
Status: Merged
Merged at revision: 22
Proposed branch: lp:~sil/cheers/xdg-folders
Merge into: lp:~cheers/cheers/trunk
Diff against target: 18 lines (+2/-2)
1 file modified
cheers/config.py (+2/-2)
To merge this branch: bzr merge lp:~sil/cheers/xdg-folders
Reviewer Review Type Date Requested Status
Manish Sinha (मनीष सिन्हा) Approve
Review via email: mp+39914@code.launchpad.net

Description of the change

use xdg.BaseDirectory instead of hardcoding .local :-)

To post a comment you must log in.
Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

A simple change. It works.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cheers/config.py'
2--- cheers/config.py 2010-10-27 19:05:54 +0000
3+++ cheers/config.py 2010-11-03 00:03:46 +0000
4@@ -22,12 +22,12 @@
5
6 import datastore
7 import os
8+import xdg.BaseDirectory
9
10 CHEERS_BUS_NAME = "org.gnome.cheers"
11 CHEERS_OBJECT_PATH = "/org/gnome/cheers/trophies"
12
13-home_folder = os.path.expanduser("~")
14-cheers_data_path = os.path.join(home_folder, ".local", "share", "cheers")
15+cheers_data_path = xdg.BaseDirectory.save_data_path("cheers")
16
17 trophy_dump_path = os.path.join(cheers_data_path, "trophies")
18 global_trophy_path = "/usr/share/cheers/trophies"

Subscribers

People subscribed via source and target branches