SizeMixIn first assert than call super()
This commit is contained in:
parent
29f4be0f10
commit
04a3e80311
@ -267,9 +267,9 @@ class SizeMixIn(XenVolume):
|
||||
'''
|
||||
|
||||
def __init__(self, size=0, **kwargs):
|
||||
super(SizeMixIn, self).__init__(size=int(size), **kwargs)
|
||||
assert size, 'Empty size provided'
|
||||
assert size > 0, 'Size for volume ' + kwargs['name'] + ' is <=0'
|
||||
super(SizeMixIn, self).__init__(size=int(size), **kwargs)
|
||||
|
||||
@property
|
||||
def usage(self):
|
||||
|
Loading…
Reference in New Issue
Block a user