[sysadmin-bin] semi_rdf has to be portable between py2 and py3



commit d6b364a713ee39d8179f76519372175690c5e42b
Author: Andrea Veri <averi redhat com>
Date:   Thu Nov 12 23:05:01 2020 +0100

    semi_rdf has to be portable between py2 and py3

 git/semi_rdf.py | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/git/semi_rdf.py b/git/semi_rdf.py
index 5fd0ee1..f0492a2 100755
--- a/git/semi_rdf.py
+++ b/git/semi_rdf.py
@@ -32,6 +32,11 @@ XML = "http://www.w3.org/XML/1998/namespace";
 
 WHITESPACE_RE = re.compile("\s+")
 
+try:
+  basestring
+except NameError:
+  basestring = str
+
 # Tag strings as urls
 class UrlResource(str):
     pass


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]