Skip to content
Browse files

Raise actual exceptions in set_cookie loose_parse

  • Loading branch information...
1 parent 2ff506c commit 2b785da23d5ba5f3adf6b16540be73276695f59c @mnot committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 redbot/headers/set_cookie.py
View
4 redbot/headers/set_cookie.py
@@ -61,11 +61,11 @@ def loose_parse(set_cookie_string, uri_path, current_time, subject, red):
red.set_message(subject, rs.SET_COOKIE_NO_VAL,
name_value_pair.strip()
)
- raise
+ raise ValueError, "Cookie doesn't have a value"
name, value = name.strip(), value.strip()
if name == "":
red.set_message(subject, rs.SET_COOKIE_NO_NAME)
- raise
+ raise ValueError, "Cookie doesn't have a name"
cookie_name, cookie_value = name, value
cookie_attribute_list = []
while unparsed_attributes != "":

0 comments on commit 2b785da

Please sign in to comment.
Something went wrong with that request. Please try again.