From: Kefu Chai Date: Mon, 19 Oct 2015 16:48:13 +0000 (-0400) Subject: pybind/ceph_argparse: ensure osd id is >= 0 X-Git-Tag: v11.0.0~530^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5ad9d6a0ff29ba367f9fffc54e9c7745d5ee9837;p=ceph.git pybind/ceph_argparse: ensure osd id is >= 0 Signed-off-by: Kefu Chai --- diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index 96af31f4025..ed659a17dac 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -423,6 +423,8 @@ class CephOsdName(CephArgtype): i = int(i) except: raise ArgumentFormat('osd id ' + i + ' not integer') + if i < 0: + raise ArgumentFormat('osd id {0} is less than 0'.format(i)) self.nametype = t self.nameid = i self.val = i