From: Alfredo Deza Date: Tue, 27 Jun 2017 17:03:11 +0000 (-0400) Subject: ceph-volume: exceptions: create a MultipleLV error X-Git-Tag: ses5-milestone10~3^2~5^2~86 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=85ab5a164472f080c0ed15b927bb5081bc509ae3;p=ceph.git ceph-volume: exceptions: create a MultipleLV error Signed-off-by: Alfredo Deza --- diff --git a/src/ceph-volume/ceph_volume/exceptions.py b/src/ceph-volume/ceph_volume/exceptions.py index eb35bf1bdf5a..44739264fb4d 100644 --- a/src/ceph-volume/ceph_volume/exceptions.py +++ b/src/ceph-volume/ceph_volume/exceptions.py @@ -14,3 +14,14 @@ class SuperUserError(Exception): def __str__(self): return 'This command needs to be executed with sudo or as root' + + +class MultipleLVsError(Exception): + + def __init__(self, lv_name, lv_path): + self.lv_name = lv_name + self.lv_path = lv_path + + def __str__(self): + msg = "Got more than 1 result looking for %s with path: %s" % (self.lv_name, self.lv_path) + return msg