Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
Mynij
slapos-mynij-dev
Commits
7a4d4591
Commit
7a4d4591
authored
Aug 07, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jsondump recipe: use GenericBaseRecipe.
parent
e18d01ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
slapos/recipe/jsondump.py
slapos/recipe/jsondump.py
+8
-8
No files found.
slapos/recipe/jsondump.py
View file @
7a4d4591
from
slapos.recipe.librecipe
import
GenericBaseRecipe
import
json
import
os
class
Recipe
(
object
):
def
__init__
(
self
,
buildout
,
name
,
options
):
class
Recipe
(
GenericBaseRecipe
):
def
install
(
self
):
parameter_dict
=
{
key
:
value
for
key
,
value
in
options
.
items
()
for
key
,
value
in
self
.
options
.
items
()
if
key
not
in
[
'json-output'
,
'recipe'
]
}
self
.
_json_output
=
options
[
'json-output'
]
with
os
.
fdopen
(
os
.
open
(
self
.
_json_output
,
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_TRUNC
,
0o600
),
'w'
)
as
fout
:
with
os
.
fdopen
(
os
.
open
(
self
.
options
[
'json-output'
],
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_TRUNC
,
0o600
),
'w'
)
as
fout
:
fout
.
write
(
json
.
dumps
(
parameter_dict
,
indent
=
2
,
sort_keys
=
True
))
fout
.
close
()
def
install
(
self
):
return
[
self
.
_json_output
]
return
[
self
.
options
[
'json-output'
]]
update
=
install
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