commit | c7743aaac3b318c3e4c8583d8b1e5f3be267d119 | [log] [tgz] |
---|---|---|
author | Senthil Kumaran <orsenthil@gmail.com> | Mon Jul 19 17:35:50 2010 +0000 |
committer | Senthil Kumaran <orsenthil@gmail.com> | Mon Jul 19 17:35:50 2010 +0000 |
tree | 291c2ccf9af29da370a5a138bccc88802323ffca | |
parent | e9a6a7dd4c19d2630ff1d24ce6d9f30879138e81 [diff] [blame] |
Fix Issue9301 - urllib.quote(None) to raise TypeError
diff --git a/Lib/urllib.py b/Lib/urllib.py index e32a771..3460a56 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py
@@ -1223,6 +1223,8 @@ """ # fastpath if not s: + if s is None: + raise TypeError('None object cannot be quoted') return s if encoding is not None or isinstance(s, unicode):