use the standard error message from FileNotFound:
```
cephadm bootstrap --mon-ip 192.168.1.1 --config ~/foobar
ERROR: [Errno 2] No such file or directory: '/root/foobar'
```
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit
870e9bddd2a059ae4930a2eed163bb862094dcaa)
try:
with open(ctx.config, 'r') as f:
config = f.read()
- except FileNotFoundError:
- raise Error('config file: %s does not exist' % ctx.config)
+ except FileNotFoundError as e:
+ raise Error(e)
if 'key' in ctx and ctx.key:
keyring = '[%s]\n\tkey = %s\n' % (ctx.name, ctx.key)
try:
with open(ctx.keyring, 'r') as f:
keyring = f.read()
- except FileNotFoundError:
- raise Error('keyring file: %s does not exist' % ctx.keyring)
+ except FileNotFoundError as e:
+ raise Error(e)
return config, keyring