Opened 4 years ago

Closed 4 years ago

#18341 closed defect (fixed)

Chutney won't run because some print() statements are borken

Reported by: isis Owned by: nickm
Priority: Very High Milestone:
Component: Core Tor/Chutney Version:
Severity: Normal Keywords:
Cc: isis Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/isis/code/torproject/chutney/lib/chutney/TorNet.py", line 1180, in <module>
    sys.exit(main())
  File "/home/isis/code/torproject/chutney/lib/chutney/TorNet.py", line 1174, in main
    result = runConfigFile(args['action'], f)
  File "/home/isis/code/torproject/chutney/lib/chutney/TorNet.py", line 1151, in runConfigFile
    return getattr(network, verb)()
  File "/home/isis/code/torproject/chutney/lib/chutney/TorNet.py", line 841, in configure
    b.preConfig(network)
  File "/home/isis/code/torproject/chutney/lib/chutney/TorNet.py", line 320, in preConfig
    self._genAuthorityKey()
  File "/home/isis/code/torproject/chutney/lib/chutney/TorNet.py", line 387, in _genAuthorityKey
    "path, or put the binary into $PATH.") % tor_gencert
TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'

Umm… the % operator goes inside the print() function call. Otherwise, you're attempting to do a format string operation on the return value of the print() function (which is None).

Child Tickets

Change History (2)

comment:1 Changed 4 years ago by isis

Status: newneeds_review

Fixed in my bug18341 branch.

comment:2 Changed 4 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merged; thanks!

Note: See TracTickets for help on using tickets.