From: Stefan Metzmacher Date: Fri, 25 May 2018 05:52:40 +0000 (+0200) Subject: python: call fault_setup() if samba.getopt is used X-Git-Tag: tevent-0.9.37~385 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=454edac226bc87b9e68bc60add4c16f4bab9c275;p=thirdparty%2Fsamba.git python: call fault_setup() if samba.getopt is used This means we have a samba command line tool written in python, e.g. samba-tool We should get the samba typicall backtraces instead of just "Segmentation fault (core dumped)". BUG: https://bugzilla.samba.org/show_bug.cgi?id=13469 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jun 12 11:04:55 CEST 2018 on sn-devel-144 --- diff --git a/python/samba/getopt.py b/python/samba/getopt.py index b33a5c07ba4..3c819aed61d 100644 --- a/python/samba/getopt.py +++ b/python/samba/getopt.py @@ -34,6 +34,8 @@ class SambaOptions(optparse.OptionGroup): """General Samba-related command line options.""" def __init__(self, parser): + from samba import fault_setup + fault_setup() from samba.param import LoadParm optparse.OptionGroup.__init__(self, parser, "Samba Common Options") self.add_option("-s", "--configfile", action="callback",