Skip to content

Commit 17d5f53

Browse files
authored
Merge pull request #6503 from stsewd/dont-pass-build-when-sync-repo
Don't pass build to environment when doing a sync
2 parents 956d1af + 7bf95da commit 17d5f53

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

readthedocs/doc_builder/environments.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def run_command_class(
481481
log.warning(
482482
LOG_TEMPLATE,
483483
{
484-
'project': self.project.slug,
484+
'project': self.project.slug if self.project else '',
485485
'version': 'latest',
486486
'msg': msg,
487487
}
@@ -570,8 +570,8 @@ def __exit__(self, exc_type, exc_value, tb):
570570
log.info(
571571
LOG_TEMPLATE,
572572
{
573-
'project': self.project.slug,
574-
'version': self.version.slug,
573+
'project': self.project.slug if self.project else '',
574+
'version': self.version.slug if self.version else '',
575575
'msg': 'Build finished',
576576
}
577577
)
@@ -614,9 +614,9 @@ def handle_exception(self, exc_type, exc_value, _):
614614
extra={
615615
'stack': True,
616616
'tags': {
617-
'build': self.build.get('id'),
618-
'project': self.project.slug,
619-
'version': self.version.slug,
617+
'build': self.build.get('id') if self.build else '',
618+
'project': self.project.slug if self.project else '',
619+
'version': self.version.slug if self.version else '',
620620
},
621621
},
622622
)

readthedocs/projects/tasks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ def run(self, version_pk): # pylint: disable=arguments-differ
243243
environment = LocalBuildEnvironment(
244244
project=self.project,
245245
version=self.version,
246-
build=self.build,
247246
record=False,
248247
update_on_success=False,
249248
)

0 commit comments

Comments
 (0)