Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restartcheck: fix python 3 bytestring breakage
In python 2, bytes is an alias for str and b'foo' == 'foo' so this code used to work, but in python 3 bytes is a separate type, b'foo' != 'foo' so pth.startswith() errors because of the type mismatch: "Passed invalid arguments: startswith first arg must be bytes or a tuple of bytes, not str." Fix this by converting bytes to an unicode string so the code works in both v2 and v3. Signed-off-by: Ioan-Adrian Ratiu <[email protected]>
- Loading branch information