Merge lp:~matsubara/tarmac/tarmac-bug-415645 into lp:tarmac

Proposed by Diogo Matsubara
Status: Merged
Approved by: Paul Hummer
Approved revision: 146
Merged at revision: not available
Proposed branch: lp:~matsubara/tarmac/tarmac-bug-415645
Merge into: lp:tarmac
Diff against target: None lines
To merge this branch: bzr merge lp:~matsubara/tarmac/tarmac-bug-415645
Reviewer Review Type Date Requested Status
Paul Hummer Approve
Review via email: mp+10394@code.launchpad.net

Commit message

python-xdg is now optional (fixes bug 415645)

To post a comment you must log in.
Revision history for this message
Diogo Matsubara (matsubara) wrote :

This branch adds a fallback path to xdg_config_home and xdg_cache_home in case python-xdg is not installed on a Linux system running tarmac.

Revision history for this message
Paul Hummer (rockstar) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tarmac/xdgdirs.py'
2--- tarmac/xdgdirs.py 2009-07-15 03:01:14 +0000
3+++ tarmac/xdgdirs.py 2009-08-19 15:23:58 +0000
4@@ -28,6 +28,10 @@
5 from bzrlib import win32utils as win
6 xdg_config_home = win.get_appdata_location_unicode()
7 xdg_cache_home = get_temp_location()
8+ else:
9+ home = os.environ.get('HOME')
10+ xdg_config_home = os.path.join(home, '.config/')
11+ xdg_cache_home = os.path.join(home, '.cache/')
12
13
14 # XXX This function should be merged into bzrlib.win32utils

Subscribers

People subscribed via source and target branches