summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Aastrand Grimnes <gromgull@gmail.com>2017-01-24 13:57:45 +0100
committerGunnar Aastrand Grimnes <gromgull@users.noreply.github.com>2017-01-24 15:04:10 +0100
commit5c2b56953850a0035e2081372c4afc756c546ea3 (patch)
tree8c5ffa0881d65769c2fa98f2174edcff7842b756
parent7bec219df4ab78afcd17f3611bba10aa9ee05b37 (diff)
downloadrdflib-5c2b56953850a0035e2081372c4afc756c546ea3.tar.gz
skip serialising empty default graph
-rw-r--r--rdflib/plugins/serializers/trig.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/rdflib/plugins/serializers/trig.py b/rdflib/plugins/serializers/trig.py
index f8bd789d..5036050c 100644
--- a/rdflib/plugins/serializers/trig.py
+++ b/rdflib/plugins/serializers/trig.py
@@ -60,6 +60,8 @@ class TrigSerializer(TurtleSerializer):
firstTime = True
for store, (ordered_subjects, subjects, ref) in self._contexts.items():
+ if not ordered_subjects: continue
+
self._references = ref
self._serialized = {}
self.store = store