httppeer: make __del__ access to self.urlopener more safe
Some errors could in some cases show unfortunate scary and confusing warnings
from the httppeer delstructors:
abort: nodename nor servname provided, or not known
Exception AttributeError: "'httpspeer' object has no attribute 'urlopener'" in <bound method httpspeer.__del__ of <mercurial.httppeer.httpspeer object at 0x
106e1f5d0>> ignored```
To mute that, take
7b15dd9125b3 to the next level and use getattr in __del__.
#require test-repo
Enable obsolescence to avoid the warning issue when obsmarker are found
$ . "$TESTDIR/helpers-testrepo.sh"
Go back in the hg repo
$ cd $TESTDIR/..
$ for node in `hg log --rev 'not public() and ::.' --template '{node|short}\n'`; do
> hg export $node | contrib/check-commit > ${TESTTMP}/check-commit.out
> if [ $? -ne 0 ]; then
> echo "Revision $node does not comply with rules"
> echo '------------------------------------------------------'
> cat ${TESTTMP}/check-commit.out
> echo
> fi
> done