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
1 commit merged into from Feb 13, 2020
Merged

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

1 commit merged into from Feb 13, 2020

Conversation

stevenengler
Copy link
Contributor

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: ''

@ghost ghost merged commit 185852f into torproject:master Feb 13, 2020
@stevenengler stevenengler deleted the ticket-33304 branch February 17, 2020 16:48
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant