diff options
author | John Estabrook <jestabro@vyos.io> | 2023-01-27 11:14:29 -0600 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-01-27 13:59:44 -0600 |
commit | dcfde8d749ea38216a45dcc4072a378eb0d02f45 (patch) | |
tree | 585ecef1003abe5e4bb4cdca0e5c0e6b706da62c /python/vyos | |
parent | e6023a3c710a84c12f9ce51d41af21120bb44e5a (diff) | |
download | vyos-1x-dcfde8d749ea38216a45dcc4072a378eb0d02f45.tar.gz vyos-1x-dcfde8d749ea38216a45dcc4072a378eb0d02f45.zip |
configtree: T4961: improve error reporting of copy
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/configtree.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/vyos/configtree.py b/python/vyos/configtree.py index b88615513..f2358ee4f 100644 --- a/python/vyos/configtree.py +++ b/python/vyos/configtree.py @@ -242,7 +242,8 @@ class ConfigTree(object): raise ConfigTreeError() res = self.__copy(self.__config, oldpath_str, newpath_str) if (res != 0): - raise ConfigTreeError("Path [{}] doesn't exist".format(old_path)) + msg = self.__get_error().decode() + raise ConfigTreeError(msg) if self.__migration: print(f"- op: copy old_path: {old_path} new_path: {new_path}") |