buildtools/wafsamba: Avoid decode when using python2
[samba.git] / buildtools / wafsamba / samba_perl.py
index 3d4fe29027f7d6706f810fc303b2e4c6f521aa34..e019acb0fa17d35775b3583eb3e5f121e287e9b6 100644 (file)
@@ -1,6 +1,6 @@
 from waflib import Utils
 from waflib.Configure import conf
-
+from samba_utils import get_string
 done = {}
 
 @conf
@@ -17,7 +17,7 @@ def SAMBA_CHECK_PERL(conf, mandatory=True, version=(5,0,0)):
     def read_perl_config_var(cmd):
         output = Utils.cmd_output([conf.env.get_flat('PERL'), '-MConfig', '-e', cmd])
         if not isinstance(output, str):
-            output = output.decode('utf8')
+            output = get_string(output)
         return Utils.to_list(output)
 
     def check_perl_config_var(var):