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.cmmi
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
Xavier Thompson
slapos.recipe.cmmi
Commits
651071c2
Commit
651071c2
authored
Oct 21, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve Popen usage in get_installed_files.
parent
2636c6f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
slapos/recipe/cmmi/__init__.py
slapos/recipe/cmmi/__init__.py
+7
-7
No files found.
slapos/recipe/cmmi/__init__.py
View file @
651071c2
...
@@ -174,21 +174,21 @@ class Recipe(object):
...
@@ -174,21 +174,21 @@ class Recipe(object):
# Exclude directory and don't follow link.
# Exclude directory and don't follow link.
assert
self
.
buildout_prefix
assert
self
.
buildout_prefix
log
=
logging
.
getLogger
(
self
.
name
)
log
=
logging
.
getLogger
(
self
.
name
)
cmd
=
'find %s -cnewer %s ! -type d'
%
(
self
.
buildout_prefix
,
ref_file
)
args
=
[
'find'
,
self
.
buildout_prefix
,
'-cnewer'
,
ref_file
,
'!'
,
'-type'
,
'd'
]
try
:
try
:
p
=
subprocess
.
Popen
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
)
p
=
subprocess
.
Popen
(
args
,
stdout
=
subprocess
.
PIPE
)
files
,
_
i_
=
p
.
communicate
()
files
,
_
=
p
.
communicate
()
retcode
=
p
.
returncode
retcode
=
p
.
returncode
if
retcode
<
0
:
if
retcode
<
0
:
log
.
error
(
'Command received signal %s: %s'
%
(
-
retcode
,
cmd
))
log
.
error
(
'Command received signal %s: %s'
%
(
-
retcode
,
args
))
raise
zc
.
buildout
.
UserError
(
'System error'
)
raise
zc
.
buildout
.
UserError
(
'System error'
)
elif
retcode
>
0
:
elif
retcode
>
0
:
log
.
error
(
'Command failed with exit code %s: %s'
%
(
retcode
,
cmd
))
log
.
error
(
'Command failed with exit code %s: %s'
%
(
retcode
,
args
))
raise
zc
.
buildout
.
UserError
(
'System error'
)
raise
zc
.
buildout
.
UserError
(
'System error'
)
except
OSError
,
e
:
except
OSError
,
e
:
log
.
error
(
'Command failed: %s: %s'
%
(
e
,
cmd
))
log
.
error
(
'Command failed: %s: %s'
%
(
e
,
args
))
raise
zc
.
buildout
.
UserError
(
'System error'
)
raise
zc
.
buildout
.
UserError
(
'System error'
)
return
files
.
split
()
return
files
.
split
lines
()
def
check_promises
(
self
,
log
=
None
):
def
check_promises
(
self
,
log
=
None
):
result
=
True
result
=
True
...
...
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