mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Fixed manual addition of users to the autocomplete users database
This commit is contained in:
parent
307ed093af
commit
6739045cce
@ -1,5 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import widgetUtils
|
import widgetUtils
|
||||||
|
from tweepy.errors import TweepyException
|
||||||
from . import storage, wx_manage
|
from . import storage, wx_manage
|
||||||
from wxUI import commonMessageDialogs
|
from wxUI import commonMessageDialogs
|
||||||
|
|
||||||
@ -27,8 +28,9 @@ class autocompletionManage(object):
|
|||||||
if usr == False:
|
if usr == False:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
data = self.session.twitter.twitter.get_user(screen_name=usr)
|
data = self.session.twitter.get_user(screen_name=usr)
|
||||||
except:
|
except TweepyException as e:
|
||||||
|
log.exception("Exception raised when attempting to add an user to the autocomplete database manually.")
|
||||||
self.dialog.show_invalid_user_error()
|
self.dialog.show_invalid_user_error()
|
||||||
return
|
return
|
||||||
self.database.set_user(data.screen_name, data.name, 0)
|
self.database.set_user(data.screen_name, data.name, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user