Raise custom NotEnoughSpace exception instead of IOError.
This commit is contained in:
parent
581893fa7c
commit
19ce9fea03
1 changed files with 7 additions and 1 deletions
|
@ -12,6 +12,12 @@ from voussoirkit import winglob
|
|||
|
||||
RESERVE_SPACE_ON_DRIVE = 30 * bytestring.GIBIBYTE
|
||||
|
||||
class RarParException(Exception):
|
||||
pass
|
||||
|
||||
class NotEnoughSpace(RarParException):
|
||||
pass
|
||||
|
||||
def RARCOMMAND(
|
||||
basename,
|
||||
input_pattern,
|
||||
|
@ -105,7 +111,7 @@ def assert_enough_space(pathsize, workdir, moveto, rec, rev, par):
|
|||
print(message)
|
||||
|
||||
if reserve > free_space:
|
||||
raise IOError('Please leave more space')
|
||||
raise NotEnoughSpace('Please leave more space')
|
||||
|
||||
def move(pattern, directory):
|
||||
files = winglob.glob(pattern)
|
||||
|
|
Loading…
Reference in a new issue