Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Crans Passwords
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nounous
Crans Passwords
Commits
ba79ff8c
Verified
Commit
ba79ff8c
authored
4 years ago
by
me5na7qbjqbrp
Browse files
Options
Downloads
Patches
Plain Diff
More linting!
parent
22a5005c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#4052
passed with stages
in 4 minutes and 46 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cpasswords/remote.py
+1
-1
1 addition, 1 deletion
cpasswords/remote.py
cpasswords/server.py
+6
-6
6 additions, 6 deletions
cpasswords/server.py
with
7 additions
and
7 deletions
cpasswords/remote.py
+
1
−
1
View file @
ba79ff8c
...
...
@@ -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
():
...
...
This diff is collapsed.
Click to expand it.
cpasswords/server.py
+
6
−
6
View file @
ba79ff8c
...
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment