diff options
| author | 2019-12-20 21:58:34 +0000 | |
|---|---|---|
| committer | 2019-12-20 21:58:34 +0000 | |
| commit | c5e8a8e6f175a78f606bbc8ae4ff4b45ad54828b (patch) | |
| tree | ba2a23c0ca1722597b84da69cc7b5cb4dbefc0e2 /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-x | bitbotd | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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) |
