[tor-bugs] #14332 [Chutney]: Use new string formatting interface

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jan 23 10:00:25 UTC 2015


#14332: Use new string formatting interface
-------------------------+-----------------------
 Reporter:  cypherpunks  |          Owner:  nickm
     Type:  defect       |         Status:  new
 Priority:  normal       |      Milestone:
Component:  Chutney      |        Version:
 Keywords:               |  Actual Points:
Parent ID:               |         Points:
-------------------------+-----------------------
 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

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14332>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list