# HG changeset patch # User Pierre-Yves David <pierre-yves.david@octobus.net> # Date 1556389227 -7200 # Sat Apr 27 20:20:27 2019 +0200 # Node ID a5e03453eae88f5f643413f893d3da99d00cdff2 # Parent dc48bcc3587db496b485045ea61b154e666a7fb8 benchmark: make sure `_hgserve` on BaseExchangeMixin object In some situation, the tear down might try to access an attribute not initialized yet. This is annoying since this usually hide the initial error. To avoid that, we set the default attribute value on the class to make sure the tear down find an appropriate value. diff --git a/benchmarks/basic_commands.py b/benchmarks/basic_commands.py --- a/benchmarks/basic_commands.py +++ b/benchmarks/basic_commands.py @@ -229,6 +229,9 @@ class BaseExchangeMixin(object): + # this help recovering from failure during setup + _hgserve = None + def _remote_path_cmd(self, path): if self.repo_type == 'local': return [path]