merge bitcoin#23102: Add missing re.escape() to feature_addrman test

This commit is contained in:
Kittywhiskers Van Gogh 2024-09-26 21:57:44 +00:00
parent 4db9108b74
commit c96b9aa3d9
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD

View File

@ -5,6 +5,7 @@
"""Test addrman functionality""" """Test addrman functionality"""
import os import os
import re
import struct import struct
from test_framework.messages import ser_uint256, hash256 from test_framework.messages import ser_uint256, hash256
@ -56,7 +57,7 @@ class AddrmanTest(BitcoinTestFramework):
init_error = lambda reason: ( init_error = lambda reason: (
f"Error: Invalid or corrupt peers.dat \\({reason}\\). If you believe this " f"Error: Invalid or corrupt peers.dat \\({reason}\\). If you believe this "
f"is a bug, please report it to {self.config['environment']['PACKAGE_BUGREPORT']}. " f"is a bug, please report it to {self.config['environment']['PACKAGE_BUGREPORT']}. "
f'As a workaround, you can move the file \\("{peers_dat}"\\) out of the way \\(rename, ' f'As a workaround, you can move the file \\("{re.escape(peers_dat)}"\\) out of the way \\(rename, '
"move, or delete\\) to have a new one created on the next start." "move, or delete\\) to have a new one created on the next start."
) )