mirror of
https://github.com/ceph/ceph
synced 2025-01-02 17:12:31 +00:00
ceph-daemon: fix fsid inference
All return paths should return func. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
6c7a23b343
commit
82cbfbe919
@ -235,7 +235,7 @@ def infer_fsid(func):
|
|||||||
def _infer_fsid():
|
def _infer_fsid():
|
||||||
if args.fsid:
|
if args.fsid:
|
||||||
logger.debug('Using specified fsid: %s' % args.fsid)
|
logger.debug('Using specified fsid: %s' % args.fsid)
|
||||||
return
|
return func()
|
||||||
|
|
||||||
fsid_list = []
|
fsid_list = []
|
||||||
for i in os.listdir(args.data_dir):
|
for i in os.listdir(args.data_dir):
|
||||||
@ -246,7 +246,7 @@ def infer_fsid(func):
|
|||||||
|
|
||||||
if not fsid_list:
|
if not fsid_list:
|
||||||
# TODO: raise?
|
# TODO: raise?
|
||||||
return
|
return func()
|
||||||
|
|
||||||
if len(fsid_list) > 1:
|
if len(fsid_list) > 1:
|
||||||
raise RuntimeError('Cannot infer fsid, must specify --fsid')
|
raise RuntimeError('Cannot infer fsid, must specify --fsid')
|
||||||
|
Loading…
Reference in New Issue
Block a user