Mercurial > code > home > repos > homeauto
annotate service/arduinoNode/rdflib_patch.py @ 718:edc14422f128
add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
Ignore-this: 11b16f06340adc7228930f3774323d1a
author | drewp@bigasterisk.com |
---|---|
date | Tue, 04 Feb 2020 23:33:21 -0800 |
parents | d228105749ac |
children |
rev | line source |
---|---|
169
d228105749ac
new /output to post statements which devices can handle. led and lcd output working
drewp@bigasterisk.com
parents:
diff
changeset
|
1 |
d228105749ac
new /output to post statements which devices can handle. led and lcd output working
drewp@bigasterisk.com
parents:
diff
changeset
|
2 def fixQnameOfUriWithTrailingSlash(): |
d228105749ac
new /output to post statements which devices can handle. led and lcd output working
drewp@bigasterisk.com
parents:
diff
changeset
|
3 import rdflib.namespace |
d228105749ac
new /output to post statements which devices can handle. led and lcd output working
drewp@bigasterisk.com
parents:
diff
changeset
|
4 old_split = rdflib.namespace.split_uri |
d228105749ac
new /output to post statements which devices can handle. led and lcd output working
drewp@bigasterisk.com
parents:
diff
changeset
|
5 def new_split(uri): |
d228105749ac
new /output to post statements which devices can handle. led and lcd output working
drewp@bigasterisk.com
parents:
diff
changeset
|
6 try: |
d228105749ac
new /output to post statements which devices can handle. led and lcd output working
drewp@bigasterisk.com
parents:
diff
changeset
|
7 return old_split(uri) |
d228105749ac
new /output to post statements which devices can handle. led and lcd output working
drewp@bigasterisk.com
parents:
diff
changeset
|
8 except Exception: |
d228105749ac
new /output to post statements which devices can handle. led and lcd output working
drewp@bigasterisk.com
parents:
diff
changeset
|
9 return uri, '' |
d228105749ac
new /output to post statements which devices can handle. led and lcd output working
drewp@bigasterisk.com
parents:
diff
changeset
|
10 rdflib.namespace.split_uri = new_split |