Use new string formatting interface
The Python documentation mentions issues with printf-style string formatting and recommends the new str.format()
interface [0]. The new interface is used in some parts but not everywhere. The attached patch fixes this by using the new interface where printf-style is currently used.
Additionally, it solves several bugs in lib/chutney/TorNet.py
caused by the printf-style separator (%) being outside of the print()
. The bugs result in Chutney crashing when tor
or tor-gencert
is not in PATH
and not specified through the environment variables.
[0] https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting