python/samba: fix default params for PY3 ConfigParser
authorNoel Power <noel.power@suse.com>
Tue, 6 Nov 2018 19:47:14 +0000 (19:47 +0000)
committerNoel Power <npower@samba.org>
Mon, 10 Dec 2018 09:38:22 +0000 (10:38 +0100)
The default params for the python3 version of the compat ConfigParser
are not correct. Code like
   foo = ConfigParser()
fails because of this.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/compat.py

index fdb2902a11fdabffd63c8b690d06e5f187229c02..d7603d3964ebf057d744d6be179f5162b56a52aa 100644 (file)
@@ -84,7 +84,7 @@ if PY3:
     # alias
     import io
     StringIO = io.StringIO
-    def ConfigParser(defaults=None, dict_type=None, allow_no_value=None):
+    def ConfigParser(defaults=None, dict_type=dict, allow_no_value=False):
         from configparser import ConfigParser
         return ConfigParser(defaults, dict_type, allow_no_value, interpolation=None)
 else: