Skip to content
Snippets Groups Projects
Verified Commit ba79ff8c authored by me5na7qbjqbrp's avatar me5na7qbjqbrp
Browse files

More linting!

parent 22a5005c
No related branches found
No related tags found
No related merge requests found
Pipeline #4052 passed with stages
in 4 minutes and 46 seconds
......@@ -122,7 +122,7 @@ def create_ssh_client(host, password=None):
# See https://github.com/paramiko/paramiko/issues/1609
config_path = Path.home().joinpath(".ssh/config")
# Match anything right after `Include` directive in a non commented line.
include_regex = re.compile("^(?!#).*(?<=Include )([^\s]+)")
include_regex = re.compile(r"^(?!#).*(?<=Include )([^\s]+)")
config_files = [config_path]
with open(config_path) as cpath:
for line in cpath.readlines():
......
......@@ -311,12 +311,12 @@ def backup(corps, fname, old):
def _list_to_replicate(data):
"""Renvoie une liste d'options clients sur lesquels appliquer relancer
la procédure (pour réplication auto)"""
roles = data.get('roles', [])
backups = getattr(serverconfig, 'BACKUP_ROLES', {})
servers = getattr(serverconfig, 'BACKUP_SERVERS', {})
# roles = data.get('roles', [])
# backups = getattr(serverconfig, 'BACKUP_ROLES', {})
# servers = getattr(serverconfig, 'BACKUP_SERVERS', {})
configs = set(name for role in roles for name in backups.get(role, []))
#return [clientlib.Client(servers[name]) for name in configs]
# configs = set(name for role in roles for name in backups.get(role, []))
# return [clientlib.Client(servers[name]) for name in configs]
return [] # FIXME
......@@ -338,7 +338,7 @@ def notification_mail(notifications):
liste = "\r\n".join(" * %s de %s par %s" % task for task in notifications)
hostname = socket.gethostname()
msg['From'] = f"{ serverconfig.FROM_MAIL }"
msg['To'] = f"{ serverconfig.TO_MAIL }"
msg['To'] = f"{ serverconfig.TO_MAIL }"
msg['Subject'] = "Modification de la base ({})".format(', '.join(actions))
msg['X-Mailer'] = f"{ serverconfig.cmd_name }"
msg.set_content(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment