From 27a0b86615918dc7ac88e55d2ec3bf1c8f6f6a3a Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Wed, 24 Jul 2013 22:31:17 -0700 Subject: [PATCH] ceph_argparse.py: wrong variable used if valid() fails for Ceph{Osd}Name self.t isn't valid in the failure case; use t Signed-off-by: Dan Mick --- src/pybind/ceph_argparse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index 907d2ec2b33f8..b82cc833ba66d 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -332,7 +332,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: @@ -364,7 +364,7 @@ class CephOsdName(CephArgtype): t = 'osd' i = s if t != 'osd': - raise ArgumentValid('unknown type ' + self.t) + raise ArgumentValid('unknown type ' + t) try: i = int(i) except: -- 2.39.5