Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket 33304 - Return None for pid when pid file is empty #52

Merged
merged 1 commit into from Feb 13, 2020
Merged

Ticket 33304 - Return None for pid when pid file is empty #52

merged 1 commit into from Feb 13, 2020

Conversation

Labels
None yet
Projects
None yet
2 participants
@stevenengler
Copy link
Contributor

@stevenengler stevenengler commented Feb 13, 2020

See ticket #33304.

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: ''
@torproject-pusher torproject-pusher merged commit 185852f into torproject:master Feb 13, 2020
1 check passed
@stevenengler stevenengler deleted the ticket-33304 branch Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment