buildtools/wafsamba: Finally fix reference to basestring PY3 error.
authorNoel Power <noel.power@suse.com>
Thu, 27 Sep 2018 10:39:44 +0000 (11:39 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 27 Sep 2018 23:01:23 +0000 (01:01 +0200)
While a previous attempt squashed the error on the config & make
phase, make install threw up this error again.

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

index 6a8ffb6e90c2f0f6c08993d4daabe578b352ceee..670001e753a52158a1f4ae486fa21df2555034a0 100644 (file)
@@ -1,4 +1,4 @@
-import os
+import os, sys
 from waflib import Utils, Context
 import samba_utils
 from samba_git import find_git
@@ -198,7 +198,10 @@ also accepted as dictionary entries here
         for name in sorted(self.vcs_fields.keys()):
             string+="#define SAMBA_VERSION_%s " % name
             value = self.vcs_fields[name]
-            if isinstance(value, str) or isinstance(value, basestring):
+            string_types = str
+            if sys.version_info[0] < 3:
+                string_types = basestring
+            if isinstance(value, string_types):
                 string += "\"%s\"" % value
             elif type(value) is int:
                 string += "%d" % value