annotate service/arduinoNode/rdflib_patch.py @ 981:d9bbbd8d86f6

arduinoNode: use -v for logging; support a PUT with subj+pred in query, obj in body Ignore-this: 744c3c7d95655430b8ec547e56f6b4bc darcs-hash:20150514082612-312f9-f77a103ef67321aa5a0ffd7991b92befd5dac37f
author drewp <drewp@bigasterisk.com>
date Thu, 14 May 2015 01:26:12 -0700
parents f707210c13bd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
974
f707210c13bd new /output to post statements which devices can handle. led and lcd output working
drewp <drewp@bigasterisk.com>
parents:
diff changeset
1
f707210c13bd new /output to post statements which devices can handle. led and lcd output working
drewp <drewp@bigasterisk.com>
parents:
diff changeset
2 def fixQnameOfUriWithTrailingSlash():
f707210c13bd new /output to post statements which devices can handle. led and lcd output working
drewp <drewp@bigasterisk.com>
parents:
diff changeset
3 import rdflib.namespace
f707210c13bd new /output to post statements which devices can handle. led and lcd output working
drewp <drewp@bigasterisk.com>
parents:
diff changeset
4 old_split = rdflib.namespace.split_uri
f707210c13bd new /output to post statements which devices can handle. led and lcd output working
drewp <drewp@bigasterisk.com>
parents:
diff changeset
5 def new_split(uri):
f707210c13bd new /output to post statements which devices can handle. led and lcd output working
drewp <drewp@bigasterisk.com>
parents:
diff changeset
6 try:
f707210c13bd new /output to post statements which devices can handle. led and lcd output working
drewp <drewp@bigasterisk.com>
parents:
diff changeset
7 return old_split(uri)
f707210c13bd new /output to post statements which devices can handle. led and lcd output working
drewp <drewp@bigasterisk.com>
parents:
diff changeset
8 except Exception:
f707210c13bd new /output to post statements which devices can handle. led and lcd output working
drewp <drewp@bigasterisk.com>
parents:
diff changeset
9 return uri, ''
f707210c13bd new /output to post statements which devices can handle. led and lcd output working
drewp <drewp@bigasterisk.com>
parents:
diff changeset
10 rdflib.namespace.split_uri = new_split