ceph-volume: exceptions: create a module for all exceptions

Signed-off-by: Alfredo Deza <adeza@redhat.com>
This commit is contained in:
Alfredo Deza 2017-06-23 14:39:23 -04:00
parent 2bf2758a14
commit 90ce30ec67

View File

@ -0,0 +1,16 @@
class SuffixParsingError(Exception):
def __init__(self, suffix, part=None):
self.suffix = suffix
self.part = part
def __str__(self):
return 'Unable to parse the %s from systemd suffix: %s' % (self.part, self.suffix)
class SuperUserError(Exception):
def __str__(self):
return 'This command needs to be executed with sudo or as root'