From 642236566cefe5f9b4a05fc7cb0cb2541117ca7e Mon Sep 17 00:00:00 2001 From: Nico Alt <nicoalt@posteo.org> Date: Mon, 10 Jun 2019 13:11:35 +0200 Subject: [PATCH] Convert Path.home() to string --- src/briar/api/constants.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/briar/api/constants.py b/src/briar/api/constants.py index 94794a1..34dd83f 100644 --- a/src/briar/api/constants.py +++ b/src/briar/api/constants.py @@ -6,13 +6,15 @@ from os.path import join from pathlib import Path from urllib.parse import urljoin -_BRIAR_DIR = ".briar" +_BRIAR_DIR_NAME = ".briar" +_HOME = str(Path.home()) +_BRIAR_DIR = join(_HOME, _BRIAR_DIR_NAME) _HOST = "%s://localhost:7000" _VERSION_SUFFIX = "v1/" -BRIAR_AUTH_TOKEN = join(Path.home(), _BRIAR_DIR, "auth_token") -BRIAR_DB = join(Path.home(), _BRIAR_DIR, "db", "db.mv.db") +BRIAR_AUTH_TOKEN = join(_BRIAR_DIR, "auth_token") +BRIAR_DB = join(_BRIAR_DIR, "db", "db.mv.db") BASE_HTTP_URL = urljoin(_HOST % "http", _VERSION_SUFFIX) WEBSOCKET_URL = urljoin(_HOST % "ws", "%s/ws" % _VERSION_SUFFIX) -- GitLab