From f2e144e978f9a1396452702986dd8920e180e148 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 20 May 2014 11:41:00 -0400 Subject: [PATCH] better wording when ceph.conf is not found Signed-off-by: Alfredo Deza --- ceph_deploy/conf/ceph.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ceph_deploy/conf/ceph.py b/ceph_deploy/conf/ceph.py index 795bc0b..71da4fd 100644 --- a/ceph_deploy/conf/ceph.py +++ b/ceph_deploy/conf/ceph.py @@ -46,7 +46,9 @@ def load(args): try: f = file(path) except IOError as e: - raise exc.ConfigError(e) + raise exc.ConfigError( + "%s; has `ceph-deploy new` been run in this directory?" % e + ) else: with contextlib.closing(f): return parse(f) @@ -62,7 +64,9 @@ def load_raw(args): with open(path) as ceph_conf: return ceph_conf.read() except (IOError, OSError) as e: - raise exc.ConfigError(e) + raise exc.ConfigError( + "%s; has `ceph-deploy new` been run in this directory?" % e + ) def write_conf(cluster, conf, overwrite): -- 2.47.3