Skip to content

Commit 91a0a1c

Browse files
legalsylvainetobella
authored andcommitted
[IMP] vcp_management: better message, if folder is bad / not configured
1 parent 59cd936 commit 91a0a1c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

vcp_management/models/vcp_repository_branch.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,16 @@ def process_rules(self):
7878
def _download_code(self):
7979
self.ensure_one()
8080
local_path = self.local_path
81-
os.makedirs(local_path, exist_ok=True)
81+
try:
82+
os.makedirs(local_path, exist_ok=True)
83+
except PermissionError as err:
84+
raise ValidationError(
85+
_(
86+
"Unable to create a folder in '%(local_path)s'.",
87+
local_path=local_path,
88+
)
89+
) from err
90+
8291
try:
8392
repo = git.Repo(local_path)
8493
for remote in repo.remotes:

0 commit comments

Comments
 (0)