mirror of
https://github.com/zebrajr/faceswap.git
synced 2025-12-06 00:20:09 +01:00
mask tool: log and exit if batch not using folder
This commit is contained in:
parent
4e7e5fe308
commit
8fb96b0d6e
|
|
@ -59,6 +59,10 @@ class Mask(): # pylint:disable=too-few-public-methods
|
|||
if not self._args.batch_mode:
|
||||
return [self._args.input]
|
||||
|
||||
if not os.path.isdir(self._args.input):
|
||||
logger.error("Batch mode is selected but input '%s' is not a folder", self._args.input)
|
||||
sys.exit(1)
|
||||
|
||||
retval = [os.path.join(self._args.input, fname)
|
||||
for fname in os.listdir(self._args.input)
|
||||
if os.path.isdir(os.path.join(self._args.input, fname))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user