diff --git a/lib/jnpr/jsnapy/snap.py b/lib/jnpr/jsnapy/snap.py index 66d609c8..5d63f862 100755 --- a/lib/jnpr/jsnapy/snap.py +++ b/lib/jnpr/jsnapy/snap.py @@ -165,6 +165,12 @@ def run_cmd(self, test_file, t, formats, dev, output_file, hostname, db): cmd_name, cmd_format, output_file) + self.logger_snap.error(colorama.Fore.RED + + "ERROR occurred %s" % + str(sys.exc_info()[0]), extra=self.log_detail) + self.logger_snap.error(colorama.Fore.RED + + "\n**********Complete error message***********\n %s" % + str(sys.exc_info()), extra=self.log_detail) return except Exception: self.logger_snap.error(colorama.Fore.RED + @@ -258,6 +264,13 @@ def run_rpc(self, test_file, t, formats, dev, output_file, hostname, db): rpc, reply_format, output_file) + self.logger_snap.error(colorama.Fore.RED + + "ERROR occurred:\n %s" % + str(sys.exc_info()[0]), extra=self.log_detail) + self.logger_snap.error(colorama.Fore.RED + + "\n**********Complete error message***********\n%s" % + str(sys.exc_info()), extra=self.log_detail) + return except Exception: self.logger_snap.error(colorama.Fore.RED + @@ -300,6 +313,12 @@ def run_rpc(self, test_file, t, formats, dev, output_file, hostname, db): rpc, reply_format, output_file) + self.logger_snap.error(colorama.Fore.RED + + "ERROR occurred: \n%s" % + str(sys.exc_info()[0]), extra=self.log_detail) + self.logger_snap.error(colorama.Fore.RED + + "\n**********Complete error message***********\n%s" % + str(sys.exc_info()), extra=self.log_detail) return except Exception: self.logger_snap.error(colorama.Fore.RED + diff --git a/lib/jnpr/jsnapy/testop.py b/lib/jnpr/jsnapy/testop.py index d3b5e839..ff1fbef2 100755 --- a/lib/jnpr/jsnapy/testop.py +++ b/lib/jnpr/jsnapy/testop.py @@ -261,6 +261,7 @@ def not_exists(self, x_path, ele_list, err_mssg, info_mssg, tresult = {} tresult['xpath'] = x_path tresult['testoperation'] = "not-exists" + tresult['actual_node_value'] = [] try: element = ele_list[0] except IndexError as e: