exception for file path

This commit is contained in:
Thomas Nahuel Rusiecki 2024-11-02 04:46:37 -03:00
parent 7653c9d5f9
commit 3faa98a60e
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,8 @@ class Command(BaseCommand):
elif os.path.isdir(path): elif os.path.isdir(path):
self.read_directory(path) self.read_directory(path)
else:
raise ValueError(f"The path {path} is neither a file nor a directory")
self.parsing() self.parsing()