Clean up u' prefixes and py2 bytes conversions

This commit is contained in:
Anthony Sottile
2019-06-04 17:48:06 -07:00
parent 0f4992c223
commit be2be040f9
17 changed files with 37 additions and 73 deletions

View File

@@ -134,9 +134,7 @@ def create_cleanup_lock(p):
raise
else:
pid = os.getpid()
spid = str(pid)
if not isinstance(spid, bytes):
spid = spid.encode("ascii")
spid = str(pid).encode()
os.write(fd, spid)
os.close(fd)
if not lock_path.is_file():