diff options
author | David Robillard <d@drobilla.net> | 2019-10-17 16:16:23 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-10-17 16:16:23 +0200 |
commit | cf2d9708707d4a85ad774b7a333101914736fc10 (patch) | |
tree | 901d278810efa79bad8b1f345e874b0bd58788d8 | |
parent | 8ae650ea0993c80f4ed1330fa10c6192825e5785 (diff) | |
download | ingen-cf2d9708707d4a85ad774b7a333101914736fc10.tar.gz ingen-cf2d9708707d4a85ad774b7a333101914736fc10.tar.bz2 ingen-cf2d9708707d4a85ad774b7a333101914736fc10.zip |
Fix ingenish with Python 3
-rw-r--r-- | scripts/ingen.py | 3 | ||||
-rwxr-xr-x | scripts/ingenish | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/scripts/ingen.py b/scripts/ingen.py index 594a7c01..6f9b5ed5 100644 --- a/scripts/ingen.py +++ b/scripts/ingen.py @@ -99,7 +99,8 @@ class Remote(Interface): self.ns_manager = rdflib.namespace.NamespaceManager(self.model) self.ns_manager.bind('server', self.server_base) for (k, v) in NS.__dict__.items(): - self.ns_manager.bind(k, v) + if not k.startswith('_'): + self.ns_manager.bind(k, v) if uri.startswith('unix://'): self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) self.sock.connect(uri[len('unix://'):]) diff --git a/scripts/ingenish b/scripts/ingenish index 97640645..ee53c4a5 100755 --- a/scripts/ingenish +++ b/scripts/ingenish @@ -76,7 +76,7 @@ def run(cmd): elif cmd[0] == 'exit': sys.exit(0) elif cmd[0] == 'get' and len(cmd) == 2: - print(ingen.get(cmd[1]).serialize(format='n3')) + print(ingen.get(cmd[1]).serialize(format='n3').decode('utf-8')) elif cmd[0] == 'put' and len(cmd) == 3: return ingen.put(cmd[1], cmd[2]) elif cmd[0] == 'patch' and len(cmd) == 4: |