From b1ec270d9d1c2695815debe619ce186d84596c57 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Thu, 21 Nov 2019 12:12:41 -0600 Subject: T1818: Print name of migration script on failure --- python/vyos/migrator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python/vyos/migrator.py') diff --git a/python/vyos/migrator.py b/python/vyos/migrator.py index 06db5a6df..86e1af183 100644 --- a/python/vyos/migrator.py +++ b/python/vyos/migrator.py @@ -125,8 +125,9 @@ class Migrator(object): self._config_file]) except FileNotFoundError: pass - except subprocess.CalledProcessError as err: - print("Called process error: {}.".format(err)) + except Exception as err: + print("\nMigration script error: {0}: {1}." + "".format(migrate_script, err)) sys.exit(1) if log: -- cgit v1.2.3