Merge lp:~dobey/u1db/use-dirspec into lp:u1db

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 339
Merged at revision: 339
Proposed branch: lp:~dobey/u1db/use-dirspec
Merge into: lp:u1db
Diff against target: 39 lines (+5/-4)
2 files modified
setup.py (+1/-1)
u1todo/u1todo.py (+4/-3)
To merge this branch: bzr merge lp:~dobey/u1db/use-dirspec
Reviewer Review Type Date Requested Status
Eric Casteleijn (community) Approve
Review via email: mp+113269@code.launchpad.net

Commit message

Use dirspec instead of python-xdg in u1todo

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'setup.py'
2--- setup.py 2012-06-28 11:10:06 +0000
3+++ setup.py 2012-07-03 17:57:18 +0000
4@@ -36,7 +36,7 @@
5 "package_data": {'': ["*.sql"]},
6 "scripts": ['u1db-client', 'u1db-serve'],
7 "ext_modules": ext,
8- "install_requires": ["paste", "simplejson", "routes", "pyxdg"],
9+ "install_requires": ["dirspec", "paste", "simplejson", "routes"],
10 # informational
11 "tests_require": ["testtools", "testscenarios", "Cython",
12 "pyOpenSSL"],
13
14=== modified file 'u1todo/u1todo.py'
15--- u1todo/u1todo.py 2012-06-11 12:37:40 +0000
16+++ u1todo/u1todo.py 2012-07-03 17:57:18 +0000
17@@ -19,9 +19,10 @@
18 import json
19 import os
20 import re
21-import xdg.BaseDirectory
22 import u1db
23
24+from dirspec.basedir import save_data_path
25+
26 EMPTY_TASK = json.dumps({"title": "", "done": False, "tags": []})
27
28 TAGS_INDEX = 'tags'
29@@ -37,8 +38,8 @@
30 def get_database():
31 """Get the path that the database is stored in."""
32 return u1db.open(
33- os.path.join(xdg.BaseDirectory.save_data_path("u1todo"),
34- "u1todo.u1db"), create=True)
35+ os.path.join(save_data_path("u1todo"),
36+ "u1todo.u1db"), create=True)
37
38
39 def extract_tags(text):

Subscribers

People subscribed via source and target branches