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
Boxiang Sun
slapos.recipe.cmmi
Commits
bbb0038e
Commit
bbb0038e
authored
Mar 25, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
except .. as .. syntax
parent
22384aae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
hexagonit/recipe/cmmi/__init__.py
hexagonit/recipe/cmmi/__init__.py
+2
-2
hexagonit/recipe/cmmi/tests.py
hexagonit/recipe/cmmi/tests.py
+3
-3
No files found.
hexagonit/recipe/cmmi/__init__.py
View file @
bbb0038e
...
...
@@ -95,7 +95,7 @@ class Recipe(object):
elif
retcode
>
0
:
log
.
error
(
'Command failed with exit code %s: %s'
%
(
retcode
,
cmd
))
raise
zc
.
buildout
.
UserError
(
'System error'
)
except
OSError
,
e
:
except
OSError
as
e
:
log
.
error
(
'Command failed: %s: %s'
%
(
e
,
cmd
))
raise
zc
.
buildout
.
UserError
(
'System error'
)
...
...
@@ -148,7 +148,7 @@ class Recipe(object):
current_dir
=
os
.
getcwd
()
try
:
os
.
mkdir
(
self
.
options
[
'location'
])
except
OSError
,
e
:
except
OSError
as
e
:
if
e
.
errno
==
errno
.
EEXIST
:
pass
os
.
chdir
(
compile_dir
)
...
...
hexagonit/recipe/cmmi/tests.py
View file @
bbb0038e
...
...
@@ -48,7 +48,7 @@ class NonInformativeTests(unittest.TestCase):
parts_directory_path
=
os
.
path
.
join
(
self
.
dir
,
'test_parts'
)
try
:
os
.
mkdir
(
parts_directory_path
)
except
OSError
,
e
:
except
OSError
as
e
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
bo
=
{
...
...
@@ -167,7 +167,7 @@ class NonInformativeTests(unittest.TestCase):
try
:
recipe
.
call_script
(
'%s:my_hook'
%
filename
)
self
.
fail
(
"The hook script was not called."
)
except
ValueError
,
e
:
except
ValueError
as
e
:
self
.
assertEquals
(
str
(
e
),
'I got called'
)
def
test_call_script__augmented_environment_as_third_parameter
(
self
):
...
...
@@ -189,7 +189,7 @@ class NonInformativeTests(unittest.TestCase):
try
:
recipe
.
call_script
(
'%s:my_hook'
%
filename
)
self
.
fail
(
"The hook script was not called."
)
except
ValueError
,
e
:
except
ValueError
as
e
:
self
.
assertEquals
(
str
(
e
),
'sentinel bar'
)
...
...
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