Fixed an edge case where an Attribute Error could occur
This commit is contained in:
parent
0bccbc0b6b
commit
5eaf159865
2 changed files with 2 additions and 1 deletions
|
@ -119,7 +119,7 @@ def add_to_name_cache(user, api=None):
|
|||
name = NameCache().map[user.screen_name]
|
||||
|
||||
# Now let's look at the name we've got, and see if we need a better one
|
||||
if not name:
|
||||
if not name and api is not None:
|
||||
with api.lock:
|
||||
try:
|
||||
new_user = api.GetUser(user.screen_name)
|
||||
|
|
Reference in a new issue