Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
slapos
Commits
5d76cc37
Commit
5d76cc37
authored
Jun 07, 2017
by
Hardik Juneja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the monkeypatch in random.py to incoperate the recent changes in buildout get func
parent
da72d8f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
slapos/recipe/random.py
slapos/recipe/random.py
+11
-4
No files found.
slapos/recipe/random.py
View file @
5d76cc37
...
...
@@ -123,7 +123,6 @@ class Password(object):
"""
def
__init__
(
self
,
buildout
,
name
,
options
):
options_get
=
options
.
get
self
.
create_once
=
options
.
get
(
'create-once'
,
'True'
).
lower
()
\
in
GenericBaseRecipe
.
TRUE_VALUES
try
:
...
...
@@ -140,13 +139,21 @@ class Password(object):
if
e
.
errno
!=
errno
.
ENOENT
:
raise
if
not
passwd
:
passwd
=
self
.
generatePassword
(
int
(
options
_
get
(
'bytes'
,
'8'
)))
passwd
=
self
.
generatePassword
(
int
(
options
.
get
(
'bytes'
,
'8'
)))
self
.
update
=
self
.
install
self
.
passwd
=
passwd
.
strip
(
'
\
n
'
)
# Password must not go into .installed file, for 2 reasons:
# security of course but also to prevent buildout to always reinstall.
options
.
get
=
lambda
option
,
*
args
,
**
kw
:
passwd
\
if
option
==
'passwd'
else
options_get
(
option
,
*
args
,
**
kw
)
def
get
(
option
,
*
args
,
**
kw
):
return
passwd
if
option
==
'passwd'
else
options_get
(
option
,
*
args
,
**
kw
)
try
:
options_get
=
options
.
_get
except
AttributeError
:
options_get
=
options
.
get
options
.
get
=
get
else
:
options
.
_get
=
get
generatePassword
=
staticmethod
(
generatePassword
)
...
...
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