Fix path template bug.
authorJoshua Roesslein <jroesslein@gmail.com>
Tue, 8 Dec 2009 07:07:15 +0000 (01:07 -0600)
committerJoshua Roesslein <jroesslein@gmail.com>
Tue, 8 Dec 2009 07:07:15 +0000 (01:07 -0600)
tweepy/binder.py

index 34d24b6186716d4f81e25a039436ccc6eeb55b27..37a7cd4326b06acf6a242592b3634fc694a1d034 100644 (file)
@@ -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]