Remove use of unnecessary compat shim, six.binary_type

The type `bytes` is available on all supported Python versions. On
Python 2.7, it is an alias of str, same as six.binary_type.

Makes the code slightly more forward compatible.
This commit is contained in:
Jon Dufresne 2018-10-26 06:23:11 -07:00
parent 9cde67c09c
commit 167e9b954a
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
Remove use of unnecessary compat shim, six.binary_type

View File

@ -159,7 +159,7 @@ def create_cleanup_lock(p):
else:
pid = os.getpid()
spid = str(pid)
if not isinstance(spid, six.binary_type):
if not isinstance(spid, bytes):
spid = spid.encode("ascii")
os.write(fd, spid)
os.close(fd)