Add logs when connecting to IRC and Redis

This commit is contained in:
moneromooo 2014-12-28 11:33:38 +00:00
parent 7217a0966d
commit 670b9c49f8
1 changed files with 2 additions and 0 deletions

View File

@ -97,6 +97,7 @@ def SendIRC(msg):
def connect_to_irc(network,port):
global irc
log_info('Connecting to IRC at %s:%u' % (network, port))
try:
irc = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )
irc.connect ( ( network, port ) )
@ -109,6 +110,7 @@ def connect_to_irc(network,port):
SendIRC ( 'USER %s %s %s :%s' % (tipbot_name, tipbot_name, tipbot_name, tipbot_name))
def connect_to_redis(host,port):
log_info('Connecting to Redis at %s:%u' % (host, port))
try:
return redis.Redis(host=host,port=port)
except Exception, e: