The Samba-Bugzilla – Attachment 14742 Details for
Bug 13721
simple samba-tool dns error messages throw backtraces
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-samba-tool-don-t-print-backtrace-on-simple-DNS-error.patch (text/plain), 2.99 KB, created by
Björn Jacke
on 2018-12-18 13:28:01 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Björn Jacke
Created:
2018-12-18 13:28:01 UTC
Size:
2.99 KB
patch
obsolete
>From a982e1a0447a5e43013948eaacc7d7b8ac7c904f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de> >Date: Tue, 18 Dec 2018 12:58:53 +0100 >Subject: [PATCH] samba-tool: don't print backtrace for simple DNS errors > >samba-tool throws backtraces even for simple DNS error >messages, we should not frighten users for no good reason. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13721 > >Signed-off-by: Bjoern Jacke <bjacke@samba.org> >--- > python/samba/netcmd/dns.py | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py >index b50e7b7dd0c2..b7459a71acd9 100644 >--- a/python/samba/netcmd/dns.py >+++ b/python/samba/netcmd/dns.py >@@ -780,7 +780,7 @@ class cmd_zonedelete(Command): > None) > except WERRORError as e: > if e.args[0] == werror.WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST: >- self.outf.write('Zone does not exist and so could not be deleted.') >+ raise CommandError('Zone does not exist and so could not be deleted.') > raise e > > self.outf.write('Zone %s deleted successfully\n' % zone) >@@ -860,7 +860,7 @@ class cmd_query(Command): > None, record_type, select_flags, None, None) > except WERRORError as e: > if e.args[0] == werror.WERR_DNS_ERROR_NAME_DOES_NOT_EXIST: >- self.outf.write('Record or zone does not exist.') >+ raise CommandError('Record or zone does not exist.') > raise e > > print_dnsrecords(self.outf, res) >@@ -940,7 +940,7 @@ class cmd_add_record(Command): > 0, server, zone, name, add_rec_buf, None) > except WERRORError as e: > if e.args[0] == werror.WERR_DNS_ERROR_NAME_DOES_NOT_EXIST: >- self.outf.write('Zone does not exist; record could not be added.\n') >+ raise CommandError('Zone does not exist; record could not be added.') > raise e > > self.outf.write('Record added successfully\n') >@@ -1011,7 +1011,7 @@ class cmd_update_record(Command): > del_rec_buf) > except WERRORError as e: > if e.args[0] == werror.WERR_DNS_ERROR_NAME_DOES_NOT_EXIST: >- self.outf.write('Zone does not exist; record could not be updated.\n') >+ raise CommandError('Zone does not exist; record could not be updated.') > raise e > > self.outf.write('Record updated successfully\n') >@@ -1066,7 +1066,7 @@ class cmd_delete_record(Command): > del_rec_buf) > except WERRORError as e: > if e.args[0] == werror.WERR_DNS_ERROR_NAME_DOES_NOT_EXIST: >- self.outf.write('Zone does not exist; record could not be deleted.\n') >+ raise CommandError('Zone does not exist; record could not be deleted.') > raise e > > self.outf.write('Record deleted successfully\n') >-- >2.17.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
kseeger
:
review?
(
metze
)
Actions:
View
Attachments on
bug 13721
: 14742