Skip to content

Commit b2d248a

Browse files
committed
Initialize local variable before using it
If the try..except block fails and there is not results, we end up with `updated` undefined.
1 parent 86bfdff commit b2d248a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readthedocs/oauth/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
BitbucketService,
1313
GitHubService,
1414
GitLabService,
15-
registry,
1615
)
1716
from readthedocs.projects.models import Project
1817

@@ -32,6 +31,7 @@ def update_webhook(project, integration, request=None):
3231
if service_cls is None:
3332
return None
3433

34+
updated = False
3535
try:
3636
account = project.remote_repository.account
3737
service = service_cls(request.user, account)

0 commit comments

Comments
 (0)