Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1058)

Issue 161051: Add versioned configuration directory (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 4 months ago by ced1
Modified:
14 years, 4 months ago
Reviewers:
bch, bch, h.goebel, yangoon1
Visibility:
Public.

Patch Set 1 #

Patch Set 2 : Add test on config dir before calling makedirs #

Patch Set 3 : Add CHANGELOG and update doc #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -34 lines) Patch
M CHANGELOG View 1 chunk +1 line, -0 lines 0 comments Download
M doc/usage.rst View 1 chunk +2 lines, -2 lines 1 comment Download
M tryton/client.py View 2 chunks +2 lines, -2 lines 0 comments Download
M tryton/config.py View 1 2 chunks +12 lines, -27 lines 6 comments Download
M tryton/gui/main.py View 3 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 7
ced1
14 years, 4 months ago (2009-11-25 22:45:33 UTC) #1
ced1
14 years, 4 months ago (2009-11-26 11:38:57 UTC) #2
bch
On 2009/11/26 11:38:57, ced wrote: > OK for me
14 years, 4 months ago (2009-11-27 12:02:11 UTC) #3
yangoon1
Works for me (Linux). Changelog missing. And would be nice to have some hint in ...
14 years, 4 months ago (2009-11-27 13:30:17 UTC) #4
ced1
14 years, 4 months ago (2009-11-27 17:51:53 UTC) #5
yangoon1
Ok http://codereview.appspot.com/161051/diff/8/2003 File doc/usage.rst (right): http://codereview.appspot.com/161051/diff/8/2003#newcode926 doc/usage.rst:926: Udo Spallek, Bertrand Chenal, Mattias Behrle, Anne Krings ...
14 years, 4 months ago (2009-11-27 21:37:05 UTC) #6
h.goebel
14 years, 4 months ago (2009-12-05 16:02:16 UTC) #7
http://codereview.appspot.com/161051/diff/8/2005
File tryton/config.py (right):

http://codereview.appspot.com/161051/diff/8/2005#newcode17
tryton/config.py:17: if os.name == 'nt':
Why not simply user os.path.expanduser('~') here? This does the same and handles
some other cases, too (see e.g. std-module ntpath.py). Otherwise have a look at
std-module user.py.

http://codereview.appspot.com/161051/diff/8/2005#newcode19
tryton/config.py:19: return os.environ['HOME']
$HOME may not be set

http://codereview.appspot.com/161051/diff/8/2005#newcode21
tryton/config.py:21: def get_config_dir():
duplicate code here. Shoudl read like:
if os.name == 'nt':
  basedir = os.environ['APPDATA']
else:
  basedir = os.environ['HOME']
return os.path.join(basedir, '.config', 'tryton', VERSION ...)

http://codereview.appspot.com/161051/diff/8/2005#newcode21
tryton/config.py:21: def get_config_dir():
Please add a short doc string here

http://codereview.appspot.com/161051/diff/8/2005#newcode23
tryton/config.py:23: return os.path.join(os.environ['APPDATA'], '.config',
'tryton',
std-module site.py uses:
  base = os.environ.get("APPDATA") or "~"

http://codereview.appspot.com/161051/diff/8/2005#newcode25
tryton/config.py:25: return os.path.join(os.environ['HOME'], '.config',
'tryton',
Again: $HOME may not be set.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b