From: Joshua Roesslein Date: Tue, 8 Dec 2009 07:07:15 +0000 (-0600) Subject: Fix path template bug. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d7b81dfcaade3ab881375320db7c242b6daaff36;p=tweepy.git Fix path template bug. --- diff --git a/tweepy/binder.py b/tweepy/binder.py index 34d24b6..37a7cd4 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -84,11 +84,11 @@ def bind_api(path, parser, allowed_param=[], method='GET', require_auth=False, if parameters: # Replace any template variables in path tpath = str(path) - for template in re_path_template.findall(path): + for template in re_path_template.findall(tpath): name = template.strip('{}') try: value = urllib.quote(parameters[name]) - tpath = path.replace(template, value) + tpath = tpath.replace(template, value) except KeyError: raise TweepError('Invalid path key: %s' % name) del parameters[name]