Remove hardcoded /home/deck HOME_DIR
This commit is contained in:
parent
a60358e494
commit
10c66f00c0
1 changed files with 5 additions and 2 deletions
7
main.py
7
main.py
|
@ -2,11 +2,14 @@ import json
|
||||||
import os
|
import os
|
||||||
import asyncio
|
import asyncio
|
||||||
import time
|
import time
|
||||||
|
import pathlib
|
||||||
|
|
||||||
|
HOME_DIR = str(pathlib.Path(os.getcwd()).parent.parent.resolve())
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
filename = "/home/deck/.fantastic.log",
|
filename = "/tmp/fantastic.log",
|
||||||
format = '%(asctime)s %(levelname)s %(message)s',
|
format = '%(asctime)s %(levelname)s %(message)s',
|
||||||
filemode = 'w',
|
filemode = 'w',
|
||||||
force = True)
|
force = True)
|
||||||
|
@ -21,7 +24,7 @@ TEMPERATURE_MINIMUM = 0.0
|
||||||
TEMPERATURE_MAXIMUM = 100.0
|
TEMPERATURE_MAXIMUM = 100.0
|
||||||
|
|
||||||
DATA_SAVE_FILE = "fantastic.json"
|
DATA_SAVE_FILE = "fantastic.json"
|
||||||
DATA_SAVE_FOLDER = "/home/deck/.config/fantastic/"
|
DATA_SAVE_FOLDER = HOME_DIR + "/.config/fantastic/"
|
||||||
DATA_SAVE_PATH = DATA_SAVE_FOLDER + DATA_SAVE_FILE
|
DATA_SAVE_PATH = DATA_SAVE_FOLDER + DATA_SAVE_FILE
|
||||||
|
|
||||||
DEFAULT_DATA = {
|
DEFAULT_DATA = {
|
||||||
|
|
Loading…
Reference in a new issue