mirror of https://github.com/python/cpython.git
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:
parent
caa79a9ee4
commit
78cae61ad4
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue