]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1512] Fixed exception when vagrant is missing
authorTomek Mrugalski <tomek@isc.org>
Tue, 5 Jan 2021 14:30:18 +0000 (15:30 +0100)
committerTomek Mrugalski <tomek@isc.org>
Tue, 5 Jan 2021 14:30:18 +0000 (15:30 +0100)
hammer.py

index 6ca0c3ee46a35573c28d426cd7ab10c222f2776a..352a4c532203af8f41c91b1a629a24b9c092cf4c 100755 (executable)
--- a/hammer.py
+++ b/hammer.py
@@ -2401,9 +2401,14 @@ def build_cmd(args):
 
 
 def _check_deps_presence():
-    ret = execute('vagrant -v', super_quiet=True)
-    if ret != 0:
-        print('Missing vagrant. Please install it from https://www.vagrantup.com/')
+    try:
+        ret = execute('vagrant -v', super_quiet=True)
+        if ret != 0:
+            print('Missing vagrant. Please install it from https://www.vagrantup.com/')
+            sys.exit(1)
+    except ExecutionError as e:
+        print('Unable to run vagrant. Please install it from https://www.vagrantup.com/')
+        print('Encountered error: %s' % e)
         sys.exit(1)