Add RarExists exception.
This commit is contained in:
parent
35aca12dcf
commit
ebcc62d765
1 changed files with 4 additions and 1 deletions
|
@ -16,6 +16,9 @@ RESERVE_SPACE_ON_DRIVE = 30 * bytestring.GIBIBYTE
|
||||||
class RarParException(Exception):
|
class RarParException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
class RarExists(RarParException):
|
||||||
|
pass
|
||||||
|
|
||||||
class NotEnoughSpace(RarParException):
|
class NotEnoughSpace(RarParException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -291,7 +294,7 @@ def rarpar(
|
||||||
|
|
||||||
existing = winglob.glob(f'{basename}*.rar')
|
existing = winglob.glob(f'{basename}*.rar')
|
||||||
if existing:
|
if existing:
|
||||||
raise Exception(f'{existing[0]} already exists.')
|
raise RarExists(f'{existing[0]} already exists.')
|
||||||
|
|
||||||
#### ####
|
#### ####
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue