aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbitbotd4
1 files changed, 1 insertions, 3 deletions
diff --git a/bitbotd b/bitbotd
index c5c3692f..f678adad 100755
--- a/bitbotd
+++ b/bitbotd
@@ -49,14 +49,12 @@ if args.version:
config = Config.Config(args.config)
config.load()
-DATA_DIR = os.path.expanduser(config["data-directory"])
+DATA_DIR = os.path.expanduser(config.get("data-directory", "~/.bitbot"))
LOG_DIR = config.get("log-directory", "{DATA}/logs/").format(DATA=DATA_DIR)
DATABASE = config.get("database", "sqlite3:{DATA}/bot.db").format(DATA=DATA_DIR)
LOCK_FILE = config.get("lock-file", "{DATA}/bot.lock").format(DATA=DATA_DIR)
SOCK_FILE = config.get("sock-file", "{DATA}/bot.sock").format(DATA=DATA_DIR)
-if not os.path.isdir(DATA_DIR):
- os.mkdir(DATA_DIR)
if not os.path.isdir(LOG_DIR):
os.mkdir(LOG_DIR)