[tor-bugs] #33304 [Core Tor/Chutney]: Chutney tries to convert empty pid string to integer

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Feb 13 04:59:21 UTC 2020


#33304: Chutney tries to convert empty pid string to integer
--------------------+----------------------------------
 Reporter:  opara   |          Owner:  (none)
     Type:  defect  |         Status:  new
 Priority:  Medium  |      Component:  Core Tor/Chutney
  Version:          |       Severity:  Normal
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
 Reviewer:          |        Sponsor:
--------------------+----------------------------------
 In the {{{getPid()}}} function, Chutney reads the pid from a file and
 converts it to an integer.

 {{{
 if not os.path.exists(pidfile):
     return None

 with open(pidfile, 'r') as f:
     return int(f.read())
 }}}

 This can result in the following error:

 {{{
 ValueError: invalid literal for int() with base 10: ''
 }}}

 PR incoming...

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


More information about the tor-bugs mailing list