diff options
author | Sage Weil <sage@inktank.com> | 2013-03-04 16:29:57 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-03-04 16:29:57 -0800 |
commit | f03f62697f170d42b4b62c53d2860ff2f24a2d73 (patch) | |
tree | d823bbc961c7553f53159be82d5fcdb88d832389 | |
parent | 59505546e52a175435881b431bd349d532ae627e (diff) | |
download | ceph-f03f62697f170d42b4b62c53d2860ff2f24a2d73.tar.gz |
ceph-disk-prepare: clean up stupid check for a digit
Signed-off-by: Sage Weil <sage@inktank.com>
-rwxr-xr-x | src/ceph-disk-prepare | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ceph-disk-prepare b/src/ceph-disk-prepare index 0eca7c0cafb..3dd7e2950c2 100755 --- a/src/ceph-disk-prepare +++ b/src/ceph-disk-prepare @@ -80,9 +80,7 @@ def is_partition(dev): raise PrepareError('not a block device', dev) # if the device ends in a number, it is a partition (e.g., /dev/sda3) - - # ugh i have no internet.. how do you do a python regex? - if dev.endswith('0') or dev.endswith('1') or dev.endswith('2') or dev.endswith('3') or dev.endswith('4') or dev.endswith('4') or dev.endswith('6') or dev.endswith('7') or dev.endswith('8') or dev.endswith('9'): + if dev[-1].isdigit(): return True return False |