Pythonic codeing style change
@@ -708,8 +708,9 @@ class NamespaceManager(object):
# When documenting explain that override only applies in what cases
if prefix is None:
prefix = ""
- if (len(prefix.split(" ")) > 1):
- raise KeyError("\'" + prefix + "\' does not look like a valid prefix as it has spaces, change it into correct format")
+ elif " " in prefix:
+ raise KeyError("Prefixes may not contain spaces.")
+
bound_namespace = self.store.namespace(prefix)
# Check if the bound_namespace contains a URI
# and if so convert it into a URIRef for comparison
