Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.build
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.recipe.build
Commits
5ad49b57
Commit
5ad49b57
authored
Dec 09, 2021
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: allow repetition of characters in generated passwords
parent
b275ec90
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
slapos/recipe/__init__.py
slapos/recipe/__init__.py
+2
-1
No files found.
slapos/recipe/__init__.py
View file @
5ad49b57
...
@@ -13,7 +13,8 @@ from zc.buildout.rmtree import rmtree as buildout_rmtree
...
@@ -13,7 +13,8 @@ from zc.buildout.rmtree import rmtree as buildout_rmtree
def
generatePassword
(
length
=
8
):
def
generatePassword
(
length
=
8
):
from
random
import
SystemRandom
from
random
import
SystemRandom
from
string
import
ascii_lowercase
from
string
import
ascii_lowercase
return
''
.
join
(
SystemRandom
().
sample
(
ascii_lowercase
,
length
))
choice
=
SystemRandom
().
choice
return
''
.
join
(
choice
(
ascii_lowercase
)
for
_
in
range
(
length
))
def
is_true
(
value
,
default
=
False
):
def
is_true
(
value
,
default
=
False
):
return
default
if
value
is
None
else
(
'false'
,
'true'
).
index
(
value
)
return
default
if
value
is
None
else
(
'false'
,
'true'
).
index
(
value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment