Make compatbile with rdflib and python 2/3
[htsworkflow.git] / htsworkflow / util / rdfhelp.py
index be17dbea6dbb406ae4734964861bb090d12a2f14..28ce8c57d1787e65d529021ce100097bf5e9c600 100644 (file)
@@ -316,9 +316,9 @@ def add_default_namespaces(model):
 def get_turtle_header():
     """Return a turtle header with our typical namespaces
     """
-    empty = get_model()
-    add_default_namespaces(model)
-    return model.serialize(format='turtle')
+    empty = ConjunctiveGraph()
+    add_default_namespaces(empty)
+    return empty.serialize(format='turtle').decode()
 
 def dump_model(model, destination=None):
     if destination is None: