chiark / gitweb /
peerdb/tripe-newpeers.in (MyConfigParser._get): Automate path maintenance.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 26 May 2018 11:01:29 +0000 (12:01 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 14 Jun 2018 11:50:37 +0000 (12:50 +0100)
commit01932434251c606730fcfcbdeb92a093e9210613
tree69c147986b84fc60484bd5cded529c9a0fbdca68
parent13d7bfa8b234ffafb728d18477dc5dc9718835e2
peerdb/tripe-newpeers.in (MyConfigParser._get): Automate path maintenance.

Rather than having lots of `path.pop()' calls, and hoping that
everything balances, wrap `try ... finally ...' around the method body.
Remove the explicit poppings, and simplify.

We still need to copy the path if we find a local result or raise an
exception.
peerdb/tripe-newpeers.in