summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configtree.py3
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}")