]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume: exceptions: create a MultipleLV error
authorAlfredo Deza <adeza@redhat.com>
Tue, 27 Jun 2017 17:03:11 +0000 (13:03 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 4 Aug 2017 14:25:57 +0000 (10:25 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/exceptions.py

index eb35bf1bdf5ac4637cfa3a97436c818faca3949e..44739264fb4dab40195db9c7bc313404caf57744 100644 (file)
@@ -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