From 3faa98a60e4f136254d89793af76da4464a87536 Mon Sep 17 00:00:00 2001 From: Thomas Rusiecki Date: Sat, 2 Nov 2024 04:46:37 -0300 Subject: [PATCH] exception for file path --- evidence/management/commands/up_snapshots.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/evidence/management/commands/up_snapshots.py b/evidence/management/commands/up_snapshots.py index ca940c8..f966201 100644 --- a/evidence/management/commands/up_snapshots.py +++ b/evidence/management/commands/up_snapshots.py @@ -37,6 +37,8 @@ class Command(BaseCommand): elif os.path.isdir(path): self.read_directory(path) + else: + raise ValueError(f"The path {path} is neither a file nor a directory") self.parsing()