[Pkg-debile-commits] [debile-slave] 01/01: Raise exception if the checker is not installed

Léo Cavaillé leo.cavaille-guest at alioth.debian.org
Fri Sep 13 09:00:07 UTC 2013


This is an automated email from the git hooks/post-receive script.

leo.cavaille-guest pushed a commit to branch master
in repository debile-slave.

commit 322650916b7e4d8c91d8355798b1ff90ff1e5ae7
Author: Léo Cavaillé <leo at cavaille.net>
Date:   Fri Sep 13 10:58:04 2013 +0200

    Raise exception if the checker is not installed
---
 debileslave/runners/cppcheck.py   |    3 ++-
 debileslave/runners/lintian.py    |    3 ++-
 debileslave/runners/pep8.py       |    3 ++-
 debileslave/runners/perlcritic.py |    3 ++-
 debileslave/runners/sbuild.py     |    3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/debileslave/runners/cppcheck.py b/debileslave/runners/cppcheck.py
index 2e4e378..ac1cc03 100644
--- a/debileslave/runners/cppcheck.py
+++ b/debileslave/runners/cppcheck.py
@@ -50,6 +50,7 @@ def version():
     out, err, ret = run_command([
         'cppcheck', '--version'
     ])
-    #TODO: if ret != 0, not installed !
+    if ret != 0:
+        raise Exception("cppcheck is not installed")
     name, version = out.split(" ")
     return (name, version.strip())
diff --git a/debileslave/runners/lintian.py b/debileslave/runners/lintian.py
index ff10c44..43e0e43 100644
--- a/debileslave/runners/lintian.py
+++ b/debileslave/runners/lintian.py
@@ -42,6 +42,7 @@ def version(lintian_binary='lintian'):
     out, err, ret = run_command([
         lintian_binary, '--version'
     ])
-    #TODO: if ret != 0, not installed !
+    if ret != 0:
+        raise Exception(lintian_binary+" is not installed")
     name, version = out.split(" ")
     return (name, version.strip())
diff --git a/debileslave/runners/pep8.py b/debileslave/runners/pep8.py
index 6fee77b..82789a4 100644
--- a/debileslave/runners/pep8.py
+++ b/debileslave/runners/pep8.py
@@ -39,5 +39,6 @@ def version():
     out, err, ret = run_command([
         'pep8', '--version'
     ])
-    #TODO: if ret != 0, not installed !
+    if ret != 0:
+        raise Exception("pep8 is not installed")
     return ('pep8', out.strip())
diff --git a/debileslave/runners/perlcritic.py b/debileslave/runners/perlcritic.py
index 5c7c2b4..9215553 100644
--- a/debileslave/runners/perlcritic.py
+++ b/debileslave/runners/perlcritic.py
@@ -42,5 +42,6 @@ def perlcritic(dsc, analysis):
 
 def version():
     out, err, ret = run_command(['perlcritic', '--version'])
-    #TODO : check ret for perlcritic installation
+    if ret != 0:
+        raise Exception("perlcritic is not installed")
     return ('perlcritic', out.strip())
diff --git a/debileslave/runners/sbuild.py b/debileslave/runners/sbuild.py
index baccb6e..052f68c 100644
--- a/debileslave/runners/sbuild.py
+++ b/debileslave/runners/sbuild.py
@@ -156,7 +156,8 @@ def version():
     out, err, ret = run_command([
         "sbuild", '--version'
     ])
-    # TODO check ret
+    if ret != 0:
+        raise Exception("sbuild is not installed")
     vline = out.splitlines()[0]
     v = VERSION.match(vline)
     vdict = v.groupdict()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-slave.git



More information about the Pkg-debile-commits mailing list