Raise useful exception when called with URL for which request type

cannot be determined.

Pseudo-fix for SF bug #420724
This commit is contained in:
Jeremy Hylton 2001-05-09 15:49:24 +00:00
parent caa79a9ee4
commit 78cae61ad4
1 changed files with 2 additions and 1 deletions

View File

@ -217,7 +217,8 @@ def get_full_url(self):
def get_type(self):
if self.type is None:
self.type, self.__r_type = splittype(self.__original)
assert self.type is not None, self.__original
if self.type is None:
raise ValueError, "unknown url type: %s" % self.__original
return self.type
def get_host(self):