diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-09-02 10:57:42 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-09-02 10:58:05 +0100 |
commit | 45570e4695d7d374e6eefe7f37bebc312bf0adbc (patch) | |
tree | c388d5e38f1735f3c1d42d77b9b46194a5d96f7f /synapse/config | |
parent | Fix typo when reading TLS config (diff) | |
download | synapse-45570e4695d7d374e6eefe7f37bebc312bf0adbc.tar.xz |
os.makedirs is almost but not entirely unlike mkdir -p
Diffstat (limited to '')
-rw-r--r-- | synapse/config/_base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 970256349a..1913179c3a 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -112,7 +112,8 @@ class Config(object): if config_args.generate_config: config_dir_path = os.path.dirname(config_args.config_path) config_dir_path = os.path.abspath(config_dir_path) - os.makedirs(config_dir_path) + if not os.path.exists(config_dir_path): + os.makedirs(config_dir_path) cls.generate_config(args, config_dir_path) config = {} for key, value in vars(args).items(): |