From 6400c8c695cc7db8cc680b87932c68fced086a50 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Thu, 27 Sep 2018 11:39:44 +0100 Subject: [PATCH] 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 --- buildtools/wafsamba/samba_version.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.34.1