Skip to content

Commit fb170b3

Browse files
committed
Fixes #2025
1 parent c8cb9cf commit fb170b3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sonar/projects.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,8 +1312,11 @@ def update(self, config: types.ObjectJsonRepr) -> None:
13121312
except StopIteration:
13131313
log.warning("No main branch defined in %s configuration", self)
13141314
for branch_name, branch_data in branch_config.items():
1315-
branch = branches.Branch.get_object(self, branch_name)
1316-
branch.import_config(branch_data)
1315+
try:
1316+
branch = branches.Branch.get_object(self, branch_name)
1317+
branch.import_config(branch_data)
1318+
except exceptions.ObjectNotFound:
1319+
log.warning("Branch '%s' of %s does not exists, can't update its configuuration", branch_name, str(self))
13171320
if "binding" in config:
13181321
try:
13191322
self.set_devops_binding(config["binding"])

0 commit comments

Comments
 (0)