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
9b75e90f
Commit
9b75e90f
authored
4 years ago
by
Maxime Bombar
Browse files
Options
Downloads
Patches
Plain Diff
[client] Prevent recrypt_files from crashing
parent
3b2d4d63
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cpasswords/client.py
+2
-2
2 additions, 2 deletions
cpasswords/client.py
with
2 additions
and
2 deletions
cpasswords/client.py
+
2
−
2
View file @
9b75e90f
...
...
@@ -596,7 +596,7 @@ def recrypt_files(options, strict=False):
non strict => on ne veut rechiffrer que les fichiers qui ont au moins un de ces roles.
"""
rechiffre_roles = options.roles
_
, my_roles_w = get_my_roles(options)
my_roles
, my_roles_w = get_my_roles(options)
if rechiffre_roles is None:
# Sans précisions, on prend tous les roles qu
'
on
peut
rechiffre_roles
=
my_roles_w
...
...
@@ -613,7 +613,7 @@ def recrypt_files(options, strict=False):
else
:
return
bool
(
set
(
fileroles
).
intersection
(
rechiffre_roles
))
askfiles
=
[
filename
for
(
filename
,
fileroles
)
in
allfiles
.
iter
items
()
askfiles
=
[
filename
for
(
filename
,
fileroles
)
in
allfiles
.
items
()
if
is_wanted
(
fileroles
)]
files
=
[
get_file
(
options
,
f
)
for
f
in
askfiles
]
...
...
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