[Reproducible-commits] [debbindiff] 03/09: Exit with 2 in case of errors
Jérémy Bobbio
lunar at moszumanska.debian.org
Sun Feb 15 11:29:54 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to annotated tag 9
in repository debbindiff.
commit 7c61133b63c7df4bbee4140b70bea69a19331346
Author: Jérémy Bobbio <lunar at debian.org>
Date: Sun Feb 15 09:38:33 2015 +0000
Exit with 2 in case of errors
Let's document possible exit codes while we are at it.
Closes: #774983
---
debbindiff.py | 7 ++++++-
debian/debbindiff.1.rst | 5 +++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/debbindiff.py b/debbindiff.py
index 42ddb4c..76b6b64 100755
--- a/debbindiff.py
+++ b/debbindiff.py
@@ -24,6 +24,7 @@ import argparse
from contextlib import contextmanager
import logging
import sys
+import traceback
from debbindiff import logger, VERSION
import debbindiff.comparators
from debbindiff.presenters.html import output_html
@@ -84,4 +85,8 @@ def main():
return 0
if __name__ == '__main__':
- sys.exit(main())
+ try:
+ sys.exit(main())
+ except (Exception, KeyboardInterrupt):
+ traceback.print_exc()
+ sys.exit(2)
diff --git a/debian/debbindiff.1.rst b/debian/debbindiff.1.rst
index 2d30557..c9c38c2 100644
--- a/debian/debbindiff.1.rst
+++ b/debian/debbindiff.1.rst
@@ -41,6 +41,11 @@ OPTIONS
--max-report-size bytes maximum bytes written in report
--css url link to an extra CSS for the HTML report
+EXIT STATUS
+===========
+
+Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
+
SEE ALSO
========
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debbindiff.git
More information about the Reproducible-commits
mailing list