source: trunk/src/allmydata/scripts/default_nodedir.py

Last change on this file was 53084f7, checked in by Alexandre Detiste <alexandre.detiste@…>, at 2024-02-27T23:49:07Z

remove more Python2 compatibility

  • Property mode set to 100644
File size: 568 bytes
Line 
1"""
2Ported to Python 3.
3"""
4
5import sys
6from allmydata.util.assertutil import precondition
7from allmydata.util.fileutil import abspath_expanduser_unicode
8
9
10_default_nodedir = None
11if sys.platform == 'win32':
12    from allmydata.windows import registry
13    path = registry.get_base_dir_path()
14    if path:
15        precondition(isinstance(path, str), path)
16        _default_nodedir = abspath_expanduser_unicode(path)
17
18if _default_nodedir is None:
19    path = abspath_expanduser_unicode("~/.tahoe")
20    precondition(isinstance(path, str), path)
21    _default_nodedir = path
Note: See TracBrowser for help on using the repository browser.