Modified refs to hold Twitter modules to use the new sessions package

This commit is contained in:
Manuel Cortez 2018-08-16 17:26:19 -05:00
parent 1e27056902
commit 0966739296
5 changed files with 9 additions and 10 deletions

View File

@ -18,11 +18,11 @@ import sound
import languageHandler import languageHandler
import logging import logging
import youtube_utils import youtube_utils
from twitter import compose, utils from sessions.twitter import compose, utils
from mysc.thread_utils import call_threaded from mysc.thread_utils import call_threaded
from twython import TwythonError from twython import TwythonError
from pubsub import pub from pubsub import pub
from long_tweets import twishort, tweets from sessions.twitter.long_tweets import twishort, tweets
log = logging.getLogger("controller.buffers") log = logging.getLogger("controller.buffers")

View File

@ -3,7 +3,7 @@ import widgetUtils
import output import output
from wxUI.dialogs import lists from wxUI.dialogs import lists
from twython import TwythonError from twython import TwythonError
from twitter import compose, utils from sessions.twitter import compose, utils
from pubsub import pub from pubsub import pub
class listsController(object): class listsController(object):

View File

@ -18,7 +18,7 @@ if system == "Windows":
# from issueReporter import issueReporter # from issueReporter import issueReporter
elif system == "Linux": elif system == "Linux":
from gtkUI import (view, commonMessageDialogs) from gtkUI import (view, commonMessageDialogs)
from twitter import utils, compose from sessions.twitter import utils, compose
from sessionmanager import manager, sessionManager from sessionmanager import manager, sessionManager
import buffersController import buffersController

View File

@ -17,7 +17,7 @@ if system == "Windows":
from extra.AudioUploader import audioUploader from extra.AudioUploader import audioUploader
elif system == "Linux": elif system == "Linux":
from gtkUI.dialogs import message from gtkUI.dialogs import message
from twitter import utils from sessions.twitter import utils
class basicTweet(object): class basicTweet(object):
""" This class handles the tweet main features. Other classes should derive from this class.""" """ This class handles the tweet main features. Other classes should derive from this class."""

View File

@ -3,7 +3,6 @@
import wx import wx
import urllib2 import urllib2
import config import config
import twitter
from keys import keyring from keys import keyring
import session_exceptions as Exceptions import session_exceptions as Exceptions
import paths import paths
@ -11,7 +10,7 @@ import output
import time import time
import sound import sound
import logging import logging
from twitter import utils, compose from sessions.twitter import client, utils, compose
from twython import TwythonError, TwythonRateLimitError, TwythonAuthError from twython import TwythonError, TwythonRateLimitError, TwythonAuthError
import config_utils import config_utils
import shelve import shelve
@ -20,7 +19,7 @@ import os
from mysc.thread_utils import stream_threaded, call_threaded from mysc.thread_utils import stream_threaded, call_threaded
from pubsub import pub from pubsub import pub
log = logging.getLogger("sessionmanager.session") log = logging.getLogger("sessionmanager.session")
from long_tweets import tweets, twishort from sessions.twitter.long_tweets import tweets, twishort
from wxUI import authorisationDialog from wxUI import authorisationDialog
sessions = {} sessions = {}
@ -136,7 +135,7 @@ class Session(object):
self.session_id = session_id self.session_id = session_id
self.logged = False self.logged = False
self.settings = None self.settings = None
self.twitter = twitter.twitter.twitter() self.twitter = client.twitter()
self.db={} self.db={}
self.reconnection_function_active = False self.reconnection_function_active = False
self.counter = 0 self.counter = 0
@ -380,7 +379,7 @@ class Session(object):
log.debug("Restarting connection after 5 minutes.") log.debug("Restarting connection after 5 minutes.")
del self.twitter del self.twitter
self.logged = False self.logged = False
self.twitter = twitter.twitter.twitter() self.twitter = client.twitter()
self.login(False) self.login(False)
self.counter = 0 self.counter = 0
if self.reconnection_function_active == True: return if self.reconnection_function_active == True: return