# HG changeset patch # User Pierre-Yves David # Date 1513827340 -3600 # Node ID 895e16385a4f9fe2b0420e03d0560fb628b2dac8 # Parent ab5172ba3c81fa3fbe406f97b76ed6440c911317 stablerange: be more cautious when deleting the sql connection This triggered some crash in further development. This also match what is done elsewhere with this attribute. diff -r ab5172ba3c81 -r 895e16385a4f hgext3rd/evolve/stablerangecache.py --- a/hgext3rd/evolve/stablerangecache.py Thu Dec 21 03:42:54 2017 +0100 +++ b/hgext3rd/evolve/stablerangecache.py Thu Dec 21 04:35:40 2017 +0100 @@ -267,7 +267,8 @@ def clear(self, reset=False): super(stablerangesql, self).clear(reset=reset) - del self._con + if '_con' in vars(self): + del self._con self._subrangescache.clear() def load(self, repo):