mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
ceph-volume: exceptions: create a module for all exceptions
Signed-off-by: Alfredo Deza <adeza@redhat.com>
This commit is contained in:
parent
2bf2758a14
commit
90ce30ec67
16
src/ceph-volume/ceph_volume/exceptions.py
Normal file
16
src/ceph-volume/ceph_volume/exceptions.py
Normal 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'
|
Loading…
Reference in New Issue
Block a user