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:
parent
9cde67c09c
commit
167e9b954a
|
@ -0,0 +1 @@
|
||||||
|
Remove use of unnecessary compat shim, six.binary_type
|
|
@ -159,7 +159,7 @@ def create_cleanup_lock(p):
|
||||||
else:
|
else:
|
||||||
pid = os.getpid()
|
pid = os.getpid()
|
||||||
spid = str(pid)
|
spid = str(pid)
|
||||||
if not isinstance(spid, six.binary_type):
|
if not isinstance(spid, bytes):
|
||||||
spid = spid.encode("ascii")
|
spid = spid.encode("ascii")
|
||||||
os.write(fd, spid)
|
os.write(fd, spid)
|
||||||
os.close(fd)
|
os.close(fd)
|
||||||
|
|
Loading…
Reference in New Issue