aboutsummaryrefslogtreecommitdiff
path: root/bitbotd
diff options
context:
space:
mode:
authorGravatar jesopo2019-12-20 21:58:34 +0000
committerGravatar jesopo2019-12-20 21:58:34 +0000
commitc5e8a8e6f175a78f606bbc8ae4ff4b45ad54828b (patch)
treeba2a23c0ca1722597b84da69cc7b5cb4dbefc0e2 /bitbotd
parent!qdel should be able to delete from channel-only quotes (diff)
signature
add default for data-directory, don't try to make data dir
Diffstat (limited to 'bitbotd')
-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)