docstrings use single quote

This commit is contained in:
Nikos Kouremenos 2006-01-18 23:04:31 +00:00
parent 1c5eab53d3
commit 9e08e1d597
1 changed files with 12 additions and 12 deletions

View File

@ -164,7 +164,7 @@ def get_os_info():
return 'N/A' return 'N/A'
class Connection: class Connection:
"""Connection class""" '''Connection class'''
def __init__(self, name): def __init__(self, name):
self.name = name self.name = name
self.connected = 0 # offline self.connected = 0 # offline
@ -273,8 +273,8 @@ class Connection:
return dict return dict
def _vCardCB(self, con, vc): def _vCardCB(self, con, vc):
"""Called when we receive a vCard '''Called when we receive a vCard
Parse the vCard and send it to plugins""" Parse the vCard and send it to plugins'''
if not vc.getTag('vCard'): if not vc.getTag('vCard'):
return return
frm_iq = vc.getFrom() frm_iq = vc.getFrom()
@ -343,13 +343,13 @@ class Connection:
self.dispatch('VCARD', vcard) self.dispatch('VCARD', vcard)
def _gMailNewMailCB(self, con, gm): def _gMailNewMailCB(self, con, gm):
"""Called when we get notified of new mail messages in gmail account""" '''Called when we get notified of new mail messages in gmail account'''
if not gm.getTag('new-mail'): if not gm.getTag('new-mail'):
return return
if gm.getTag('new-mail').getNamespace() == common.xmpp.NS_GMAILNOTIFY: if gm.getTag('new-mail').getNamespace() == common.xmpp.NS_GMAILNOTIFY:
# we'll now ask the server for the exact number of new messages # we'll now ask the server for the exact number of new messages
jid = gajim.get_jid_from_account(self.name) jid = gajim.get_jid_from_account(self.name)
gajim.log.debug(('Got notification of new gmail e-mail on %s. Asking the server for more info.') % (jid)) gajim.log.debug('Got notification of new gmail e-mail on %s. Asking the server for more info.' % jid)
iq = common.xmpp.Iq(typ = 'get') iq = common.xmpp.Iq(typ = 'get')
iq.setAttr('id', '13') iq.setAttr('id', '13')
query = iq.setTag('query') query = iq.setTag('query')
@ -358,7 +358,7 @@ class Connection:
raise common.xmpp.NodeProcessed raise common.xmpp.NodeProcessed
def _gMailQueryCB(self, con, gm): def _gMailQueryCB(self, con, gm):
"""Called when we receive results from Querying the server for mail messages in gmail account""" '''Called when we receive results from Querying the server for mail messages in gmail account'''
if not gm.getTag('mailbox'): if not gm.getTag('mailbox'):
return return
if gm.getTag('mailbox').getNamespace() == common.xmpp.NS_GMAILNOTIFY: if gm.getTag('mailbox').getNamespace() == common.xmpp.NS_GMAILNOTIFY:
@ -371,7 +371,7 @@ class Connection:
raise common.xmpp.NodeProcessed raise common.xmpp.NodeProcessed
def _messageCB(self, con, msg): def _messageCB(self, con, msg):
"""Called when we receive a message""" '''Called when we receive a message'''
msgtxt = msg.getBody() msgtxt = msg.getBody()
mtype = msg.getType() mtype = msg.getType()
subject = msg.getSubject() # if not there, it's None subject = msg.getSubject() # if not there, it's None
@ -456,7 +456,7 @@ class Connection:
# END messageCB # END messageCB
def _presenceCB(self, con, prs): def _presenceCB(self, con, prs):
"""Called when we receive a presence""" '''Called when we receive a presence'''
ptype = prs.getType() ptype = prs.getType()
if ptype == 'available': if ptype == 'available':
ptype = None ptype = None
@ -591,7 +591,7 @@ class Connection:
# END presenceCB # END presenceCB
def _disconnectedCB(self): def _disconnectedCB(self):
"""Called when we are disconnected""" '''Called when we are disconnected'''
gajim.log.debug('disconnectedCB') gajim.log.debug('disconnectedCB')
if not self.connection: if not self.connection:
return return
@ -636,7 +636,7 @@ class Connection:
self.retrycount = 0 self.retrycount = 0
def _disconnectedReconnCB(self): def _disconnectedReconnCB(self):
"""Called when we are disconnected""" '''Called when we are disconnected'''
gajim.log.debug('disconnectedReconnCB') gajim.log.debug('disconnectedReconnCB')
if not self.connection: if not self.connection:
return return
@ -1629,11 +1629,11 @@ class Connection:
return h return h
def connect(self, data = None): def connect(self, data = None):
"""Connect and authenticate to the Jabber server '''Connect and authenticate to the Jabber server
Returns connection, and connection type ('tls', 'ssl', 'tcp', '') Returns connection, and connection type ('tls', 'ssl', 'tcp', '')
data MUST contain name, hostname, resource, usessl, proxy, data MUST contain name, hostname, resource, usessl, proxy,
use_custom_host, custom_host (if use_custom_host), custom_port (if use_custom_host, custom_host (if use_custom_host), custom_port (if
use_custom_host), """ use_custom_host), '''
if self.connection: if self.connection:
return self.connection, '' return self.connection, ''