diff --git a/km3pipe/tools.py b/km3pipe/tools.py
index <HASH>..<HASH> 100644
--- a/km3pipe/tools.py
+++ b/km3pipe/tools.py
@@ -352,9 +352,13 @@ def get_jpp_revision(via_command='JPrint'):
     """Retrieves the Jpp revision number"""
     try:
         output = subprocess.check_output([via_command, '-v'],
-                                         shell=True,
                                          stderr=subprocess.STDOUT)
-    except subprocess.CalledProcessError:
+    except subprocess.CalledProcessError as e:
+        if e.return_code == 1:
+            output = e.output
+        else:
+            return None
+    except OSError:
         return None
     revision = output.decode().split('\n')[0].split()[1].strip()
     return revision
This turned out to be more complicated then I thought. Thanks to unconventional exit codes