mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-17 02:09:54 +00:00
32 lines
960 B
Python
32 lines
960 B
Python
"""
|
|
Ported to Python 3.
|
|
"""
|
|
|
|
from __future__ import unicode_literals
|
|
from __future__ import absolute_import
|
|
from __future__ import division
|
|
from __future__ import print_function
|
|
|
|
from future.utils import PY2
|
|
if PY2:
|
|
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
|
|
|
|
import sys
|
|
import six
|
|
from allmydata.util.assertutil import precondition
|
|
from allmydata.util.fileutil import abspath_expanduser_unicode
|
|
|
|
|
|
_default_nodedir = None
|
|
if sys.platform == 'win32':
|
|
from allmydata.windows import registry
|
|
path = registry.get_base_dir_path()
|
|
if path:
|
|
precondition(isinstance(path, six.text_type), path)
|
|
_default_nodedir = abspath_expanduser_unicode(path)
|
|
|
|
if _default_nodedir is None:
|
|
path = abspath_expanduser_unicode(u"~/.tahoe")
|
|
precondition(isinstance(path, six.text_type), path)
|
|
_default_nodedir = path
|