From: Noel Power Date: Thu, 27 Sep 2018 10:39:44 +0000 (+0100) Subject: buildtools/wafsamba: Finally fix reference to basestring PY3 error. X-Git-Tag: tdb-1.3.17~1484 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6400c8c695cc7db8cc680b87932c68fced086a50;p=thirdparty%2Fsamba.git buildtools/wafsamba: Finally fix reference to basestring PY3 error. While a previous attempt squashed the error on the config & make phase, make install threw up this error again. Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py index 6a8ffb6e90c..670001e753a 100644 --- a/buildtools/wafsamba/samba_version.py +++ b/buildtools/wafsamba/samba_version.py @@ -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