changeset 830:9ba1c866bf4c

workaround for n3 file with rules in it Ignore-this: 67f92a3ac346476a0a6f0182f965e231
author Drew Perttula <drewp@bigasterisk.com>
date Tue, 04 Jun 2013 23:16:51 +0000
parents e53e78db7b17
children 0f7e99d02dc6
files bin/rdfdb
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bin/rdfdb	Tue Jun 04 22:46:34 2013 +0000
+++ b/bin/rdfdb	Tue Jun 04 23:16:51 2013 +0000
@@ -197,12 +197,22 @@
             self.watchFile(path.path)
             
     def watchFile(self, inFile):
+        """consider adding a GraphFile to self.graphFiles"""
         if not isinstance(inFile, FilePath):
             inFile = FilePath(inFile)
         if not inFile.isfile():
             return
         if inFile.splitext()[1] not in ['.n3']:
             return
+
+        # an n3 file with rules makes it all the way past this reading
+        # and the serialization. Then, on the receiving side, a
+        # SyncedGraph calls graphFromNQuad on the incoming data and
+        # has a parse error. I'm not sure where this should be fixed
+        # yet.
+        if '-rules' in inFile.path:
+            return
+            
         ctx = self.uriFromFile(inFile)
         gf = GraphFile(self.notifier, inFile.path, ctx,
                        self.patch, self.getSubgraph)