better PEP-8 compliance

This commit is contained in:
souliane 2014-05-07 15:44:31 +02:00
commit 1eeddf5900

View file

@ -27,7 +27,7 @@ from sat.core.exceptions import BridgeExceptionNoService, BridgeInitError
from sat_frontends.quick_frontend.quick_utils import escapePrivate, unescapePrivate
from optparse import OptionParser
from sat_frontends.quick_frontend.constants import Const
from sat_frontends.quick_frontend.constants import Const as C
class QuickApp(object):
@ -281,7 +281,7 @@ class QuickApp(object):
self.chat_wins[win.bare].printMessage(from_jid, msg, profile, float(timestamp) if timestamp else '')
def sendMessage(self, to_jid, message, subject='', mess_type="auto", extra={}, callback=None, errback=None, profile_key="@NONE@"):
if to_jid.startswith(Const.PRIVATE_PREFIX):
if to_jid.startswith(C.PRIVATE_PREFIX):
to_jid = unescapePrivate(to_jid)
mess_type = "chat"
if callback is None:
@ -527,7 +527,7 @@ class QuickApp(object):
if from_jid_s == '@ALL@':
target = '@ALL@'
nick = Const.ALL_OCCUPANTS
nick = C.ALL_OCCUPANTS
else:
from_jid = JID(from_jid_s)
target = from_jid.bare