Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
slapos.package
Commits
23ae6fa1
Commit
23ae6fa1
authored
Jun 30, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grammar
parent
6894b3c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
slapprepare/slapprepare/slapprepare.py
slapprepare/slapprepare/slapprepare.py
+5
-5
No files found.
slapprepare/slapprepare/slapprepare.py
View file @
23ae6fa1
...
@@ -90,10 +90,10 @@ class ExecError(SlapError):
...
@@ -90,10 +90,10 @@ class ExecError(SlapError):
def
_call
(
cmd_args
,
stdout
=
None
,
stderr
=
None
,
dry_run
=
False
):
def
_call
(
cmd_args
,
stdout
=
None
,
stderr
=
None
,
dry_run
=
False
):
"""
"""
Wrapper for subprocess.call() which
'll secure the usage of external program'
s.
Wrapper for subprocess.call() which
will secure the usage of external program
s.
Args:
Args:
cmd_args: list of strings representing the command and all it
'
s needed args
cmd_args: list of strings representing the command and all its needed args
stdout/stderr: only precise PIPE (from subprocess) if you don't want the
stdout/stderr: only precise PIPE (from subprocess) if you don't want the
command to create output on the regular stream
command to create output on the regular stream
"""
"""
...
@@ -542,7 +542,7 @@ def prepare_from_scratch(config):
...
@@ -542,7 +542,7 @@ def prepare_from_scratch(config):
temp_dir
=
temp_directory
,
temp_dir
=
temp_directory
,
computer_id
=
computer_id
)
computer_id
=
computer_id
)
# Prepare SlapOS Suse Server conf
u
guration
# Prepare SlapOS Suse Server conf
i
guration
if
config
.
need_ssh
:
if
config
.
need_ssh
:
get_ssh_keys
(
temp_directory
)
get_ssh_keys
(
temp_directory
)
...
@@ -558,7 +558,7 @@ def prepare_from_scratch(config):
...
@@ -558,7 +558,7 @@ def prepare_from_scratch(config):
print
>>
sys
.
stderr
,
err
.
msg
print
>>
sys
.
stderr
,
err
.
msg
return_code
=
16
return_code
=
16
except
SystemExit
as
err
:
except
SystemExit
as
err
:
# Catch exception raise by optparse
# Catch exception raise
d
by optparse
return_code
=
err
return_code
=
err
if
os
.
path
.
exists
(
temp_directory
):
if
os
.
path
.
exists
(
temp_directory
):
print
"Deleting directory: %s"
%
temp_directory
print
"Deleting directory: %s"
%
temp_directory
...
@@ -666,7 +666,7 @@ def slapprepare():
...
@@ -666,7 +666,7 @@ def slapprepare():
print
>>
sys
.
stderr
,
err
.
msg
print
>>
sys
.
stderr
,
err
.
msg
return_code
=
16
return_code
=
16
except
SystemExit
as
err
:
except
SystemExit
as
err
:
# Catch exception raise by optparse
# Catch exception raise
d
by optparse
return_code
=
err
return_code
=
err
sys
.
exit
(
return_code
)
sys
.
exit
(
return_code
)
...
...
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