Generating ASCII characters via a supported but not official escape sequence
leads to a "Anomalous backslash in string" error in newer pylint versions. This
patch fixes the issue.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
PROC_MOUNTS = "/proc/mounts"
# Local UniX Interface related constants
-LUXI_EOM = "\3"
+LUXI_EOM = chr(3)
LUXI_VERSION = CONFIG_VERSION
#: Environment variable for the luxi override socket
LUXI_OVERRIDE = "FORCE_LUXI_SOCKET"
# sending more than one wakeup token, which doesn't harm at all.
if self.need_signal:
self.need_signal = False
- self.out_socket.send("\0")
+ self.out_socket.send(chr(0))
class _ShutdownCheck:
"""Notifies the wakeup file descriptor.
"""
- self._write_fh.write("\0")
+ self._write_fh.write(chr(0))
def __del__(self):
"""Called before object deletion.
raise OperationalError("CRITICAL: Can't read partition table information"
" from /dev/%s (needed 512 bytes, got %d" %
(name, len(olddata)))
- newdata = "\0" * 512
+ newdata = chr(0) * 512
os.lseek(fd, 0, 0)
bytes_written = os.write(fd, newdata)
os.close(fd)