From 713cf347da7718681c4faaf24428807ff0555c4f Mon Sep 17 00:00:00 2001 From: Alexander Dutton Date: Fri, 7 Jan 2011 16:06:10 -0800 Subject: [PATCH] Some parameters that need substituting (e.g. addListMember) contain underscores. These weren't matched by the regex, so I've added an underscore to the character group. addListMember now works. --- twython/twython.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twython/twython.py b/twython/twython.py index fbe697b..19b1f95 100644 --- a/twython/twython.py +++ b/twython/twython.py @@ -159,7 +159,7 @@ class Twython(object): # Go through and replace any mustaches that are in our API url. fn = api_table[api_call] base = re.sub( - '\{\{(?P[a-zA-Z]+)\}\}', + '\{\{(?P[a-zA-Z_]+)\}\}', lambda m: "%s" % kwargs.get(m.group(1), '1'), # The '1' here catches the API version. Slightly hilarious. base_url + fn['url'] )