[PATCH] waf: Fix python3 compatibility.

Christian Mauderer list at c-mauderer.de
Thu May 17 18:35:19 UTC 2018


From: Christian Mauderer <christian.mauderer at embedded-brains.de>

---
 waf_libbsd.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/waf_libbsd.py b/waf_libbsd.py
index 0972cf2c..bbc8b42c 100644
--- a/waf_libbsd.py
+++ b/waf_libbsd.py
@@ -33,6 +33,11 @@
 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 from __future__ import print_function
+# Python 3 does no longer know the basestring class. Catch that.
+try:
+    basestring
+except NameError:
+    basestring = (str, bytes)
 
 import os
 import sys
-- 
2.17.0



More information about the devel mailing list