From: Tomek Mrugalski Date: Tue, 5 Jan 2021 14:30:18 +0000 (+0100) Subject: [#1512] Fixed exception when vagrant is missing X-Git-Tag: Kea-1.9.4~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2c257a0eb3baa5df295a9beb1713060429a4ee8;p=thirdparty%2Fkea.git [#1512] Fixed exception when vagrant is missing --- diff --git a/hammer.py b/hammer.py index 6ca0c3ee46..352a4c5322 100755 --- 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)