optimization when error
This commit is contained in:
+7
-2
@@ -1,13 +1,18 @@
|
||||
import configparser
|
||||
import os
|
||||
import getpass
|
||||
from pathlib import Path
|
||||
|
||||
home = str(Path.home())
|
||||
config = configparser.ConfigParser()
|
||||
config.read('./config.ini')
|
||||
print("home path: " + home)
|
||||
# check the config file exsistence
|
||||
config_file_path = home + "/config.ini"
|
||||
config.read(config_file_path)
|
||||
CONTACT_LIST_FILE = config['DEFAULT']['contact_list_file']
|
||||
FIREBASE_CONFIG_FILE = config['DEFAULT']['firebase_config_file']
|
||||
LOGS_DIR = config['DEFAULT']['LOGS_DIR']
|
||||
username = getpass.getuser()
|
||||
LOG_SOURCE = username
|
||||
LOG_SOURCE = "Macbookpro13"
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
Reference in New Issue
Block a user