view service/arduinoNode/rdflib_patch.py @ 1365:e6c6574f3d24

fix a hang bug where polling stopped Ignore-this: 7e3aaf37a2e0619c4b168cc424bf9c21 darcs-hash:f29bc74cf5a4f968bd45b9cf61e5fb5a430d9bed
author drewp <drewp@bigasterisk.com>
date Wed, 01 May 2019 00:24:13 -0700
parents f707210c13bd
children
line wrap: on
line source


def fixQnameOfUriWithTrailingSlash():
    import rdflib.namespace
    old_split = rdflib.namespace.split_uri
    def new_split(uri):
        try:
            return old_split(uri)
        except Exception:
            return uri, ''
    rdflib.namespace.split_uri = new_split