Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
6
Merge Requests
6
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
42f80faf
Commit
42f80faf
authored
Sep 03, 2018
by
Reinout van Rees
Committed by
GitHub
Sep 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #465 from jerome-nexedi/fix/exit-code-D
debugger: Exit with error code on debugged error
parents
1a55f2ae
68c582a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
CHANGES.rst
CHANGES.rst
+1
-1
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+1
-1
src/zc/buildout/debugging.txt
src/zc/buildout/debugging.txt
+4
-2
No files found.
CHANGES.rst
View file @
42f80faf
...
@@ -4,7 +4,7 @@ Change History
...
@@ -4,7 +4,7 @@ Change History
2.12.2
(
unreleased
)
2.12.2
(
unreleased
)
===================
===================
-
Nothing
changed
yet
.
-
Exit
program
with
error
code
on
error
when
running
with
``-
D
``
.
2.12.1
(
2018
-
07
-
02
)
2.12.1
(
2018
-
07
-
02
)
...
...
src/zc/buildout/buildout.py
View file @
42f80faf
...
@@ -2149,7 +2149,7 @@ def main(args=None):
...
@@ -2149,7 +2149,7 @@ def main(args=None):
else
:
else
:
sys
.
stderr
.
write
(
_internal_error_template
)
sys
.
stderr
.
write
(
_internal_error_template
)
traceback
.
print_exception
(
*
exc_info
)
traceback
.
print_exception
(
*
exc_info
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
finally
:
finally
:
logging
.
shutdown
()
logging
.
shutdown
()
...
...
src/zc/buildout/debugging.txt
View file @
42f80faf
...
@@ -56,12 +56,13 @@ And create a buildout that uses it:
...
@@ -56,12 +56,13 @@ And create a buildout that uses it:
If we run the buildout, we'll get an error:
If we run the buildout, we'll get an error:
>>> print_(system(buildout), end='')
>>> print_(system(buildout
, with_exit_code=True
), end='')
Develop: '/sample-buildout/recipes'
Develop: '/sample-buildout/recipes'
Installing data-dir.
Installing data-dir.
While:
While:
Installing data-dir.
Installing data-dir.
Error: Missing option: data-dir:directory
Error: Missing option: data-dir:directory
EXIT CODE: 1
If we want to debug the error, we can add the -D option. Here's we'll
If we want to debug the error, we can add the -D option. Here's we'll
...
@@ -71,7 +72,7 @@ supply some input:
...
@@ -71,7 +72,7 @@ supply some input:
... up
... up
... p sorted(self.options.keys())
... p sorted(self.options.keys())
... q
... q
... """), end='')
... """
, with_exit_code=True
), end='')
Develop: '/sample-buildout/recipes'
Develop: '/sample-buildout/recipes'
Installing data-dir.
Installing data-dir.
> /zc/buildout/buildout.py(925)__getitem__()
> /zc/buildout/buildout.py(925)__getitem__()
...
@@ -95,3 +96,4 @@ supply some input:
...
@@ -95,3 +96,4 @@ supply some input:
MissingOption: Missing option: data-dir:directory
MissingOption: Missing option: data-dir:directory
<BLANKLINE>
<BLANKLINE>
Starting pdb:
Starting pdb:
EXIT CODE: 1
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