Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
4dbe6263
Commit
4dbe6263
authored
Apr 02, 2010
by
Joshua Roesslein
Browse files
Fix a recursion bug when calling API.verify_credentials()
parent
2d4bb892
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/binder.py
View file @
4dbe6263
...
...
@@ -81,20 +81,19 @@ def bind_api(**config):
self
.
parameters
[
k
]
=
convert_to_utf8_str
(
arg
)
# Set 'user' paramter to the authenticated user's name
# if no 'user' parameter value provided
if
(
self
.
api
.
auth
and
'user'
not
in
self
.
parameters
):
self
.
parameters
[
'user'
]
=
self
.
api
.
auth
.
get_username
()
def
build_path
(
self
):
for
variable
in
re_path_template
.
findall
(
self
.
path
):
name
=
variable
.
strip
(
'{}'
)
try
:
value
=
urllib
.
quote
(
self
.
parameters
[
name
])
except
KeyError
:
raise
TweepError
(
'No parameter value found for path variable: %s'
%
name
)
del
self
.
parameters
[
name
]
if
name
==
'user'
and
'user'
not
in
self
.
parameters
and
self
.
api
.
auth
:
# No 'user' parameter provided, fetch it from Auth instead.
value
=
self
.
api
.
auth
.
get_username
()
else
:
try
:
value
=
urllib
.
quote
(
self
.
parameters
[
name
])
except
KeyError
:
raise
TweepError
(
'No parameter value found for path variable: %s'
%
name
)
del
self
.
parameters
[
name
]
self
.
path
=
self
.
path
.
replace
(
variable
,
value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment