From a28d5d641f42a5422b067e84fe660798dbf517ca Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Thu, 11 Jul 2013 15:54:36 +0200 Subject: [PATCH] ceph_argparse.py: fix some ArgumentValid() commands Fix raise call for ArgumentValid(): self has no member t, use t directly. Moved one check in the correct block to avoide useless checks. Signed-off-by: Danny Al-Gaaf --- src/pybind/ceph_argparse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index e9e4530c072c0..0c83fa12cd3d3 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -321,7 +321,7 @@ class CephName(CephArgtype): else: t, i = s.split('.') if not t in ('osd', 'mon', 'client', 'mds'): - raise ArgumentValid('unknown type ' + self.t) + raise ArgumentValid('unknown type ' + t) if t == 'osd': if i != '*': try: @@ -349,11 +349,11 @@ class CephOsdName(CephArgtype): return if s.find('.') != -1: t, i = s.split('.') + if t != 'osd': + raise ArgumentValid('unknown type ' + t) else: t = 'osd' i = s - if t != 'osd': - raise ArgumentValid('unknown type ' + self.t) try: i = int(i) except: -- 2.39.5