mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-27 19:37:22 +01:00
Fixed W605 (invalid-escape-sequence)
This commit is contained in:
committed by
Joshua Tauberer
parent
14a5613dc8
commit
3d72c32b1d
@@ -214,8 +214,8 @@ def check_ssh_password(env, output):
|
||||
return
|
||||
with open("/etc/ssh/sshd_config") as f:
|
||||
sshd = f.read()
|
||||
if re.search("\nPasswordAuthentication\s+yes", sshd) \
|
||||
or not re.search("\nPasswordAuthentication\s+no", sshd):
|
||||
if re.search("\nPasswordAuthentication\\s+yes", sshd) \
|
||||
or not re.search("\nPasswordAuthentication\\s+no", sshd):
|
||||
output.print_error("""The SSH server on this machine permits password-based login. A more secure
|
||||
way to log in is using a public key. Add your SSH public key to $HOME/.ssh/authorized_keys, check
|
||||
that you can log in without a password, set the option 'PasswordAuthentication no' in
|
||||
@@ -1043,8 +1043,8 @@ class FileOutput:
|
||||
|
||||
def print_block(self, message, first_line=" "):
|
||||
print(first_line, end='', file=self.buf)
|
||||
message = re.sub("\n\s*", " ", message)
|
||||
words = re.split("(\s+)", message)
|
||||
message = re.sub("\n\\s*", " ", message)
|
||||
words = re.split(r"(\s+)", message)
|
||||
linelen = 0
|
||||
for w in words:
|
||||
if self.width and (linelen + len(w) > self.width-1-len(first_line)):
|
||||
|
||||
Reference in New Issue
Block a user