Skip to content

Commit ccf6e47

Browse files
committed
Clean up basic error handling.
1 parent c9f385b commit ccf6e47

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

readthedocs/builds/syncers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def copy(cls, path, target, host, is_file=False, **__):
140140
)
141141
ret = os.system(sync_cmd)
142142
if ret != 0:
143-
log.info("COPY ERROR to app servers.")
143+
log.exception("COPY ERROR to app servers.", ret)
144144

145145

146146
class Syncer(SettingsOverrideObject):

readthedocs/projects/tasks.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,10 @@ def setup_vcs(self):
281281
if commit:
282282
self.build['commit'] = commit
283283
except ProjectImportError as e:
284-
log.error(
284+
log.exception(
285285
LOG_TEMPLATE.format(project=self.project.slug,
286286
version=self.version.slug,
287-
msg=str(e)),
288-
exc_info=True,
287+
msg='Failed to import Project: '),
289288
)
290289
raise BuildEnvironmentError('Failed to import project: %s' % e,
291290
status_code=404)
@@ -437,8 +436,7 @@ def build_docs_html(self):
437436
kwargs=dict(html=True)
438437
)
439438
except socket.error:
440-
# TODO do something here
441-
pass
439+
log.exception('move_files task has failed on socket error.')
442440

443441
return success
444442

@@ -545,8 +543,6 @@ def update_imported_docs(version_pk):
545543
version_slug = LATEST
546544
version_repo = project.vcs_repo(version_slug)
547545
ret_dict['checkout'] = version_repo.update()
548-
except Exception:
549-
raise
550546
finally:
551547
after_vcs.send(sender=version)
552548

0 commit comments

Comments
 (0)