test: Use pathlib over os.path #28362

revert netutil chgs py3.8 compliant

fixes based on PR review
This commit is contained in:
ns-xvrn
2023-09-02 01:09:43 -04:00
parent 04265ba937
commit bfa0bd632a
22 changed files with 138 additions and 168 deletions

View File

@@ -1006,5 +1006,5 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
return self.config["components"].getboolean("USE_BDB")
def has_blockfile(self, node, filenum: str):
blocksdir = os.path.join(node.datadir, self.chain, 'blocks', '')
return os.path.isfile(os.path.join(blocksdir, f"blk{filenum}.dat"))
blocksdir = node.datadir_path / self.chain / 'blocks'
return (blocksdir / f"blk{filenum}.dat").is_file()