Fix pylint/pep8 errors
This commit is contained in:
parent
646ace533f
commit
69248b2fe7
3 changed files with 22 additions and 22 deletions
|
@ -433,10 +433,10 @@ class CommonConnection:
|
||||||
return
|
return
|
||||||
|
|
||||||
app.logger.insert_into_logs(jid, obj.timestamp, obj.kind,
|
app.logger.insert_into_logs(jid, obj.timestamp, obj.kind,
|
||||||
message=obj.message,
|
message=obj.message,
|
||||||
subject=obj.subject,
|
subject=obj.subject,
|
||||||
additional_data=obj.additional_data,
|
additional_data=obj.additional_data,
|
||||||
stanza_id=obj.stanza_id)
|
stanza_id=obj.stanza_id)
|
||||||
|
|
||||||
def ack_subscribed(self, jid):
|
def ack_subscribed(self, jid):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1059,10 +1059,10 @@ class ConnectionHandlersBase:
|
||||||
show = app.logger.convert_show_values_to_db_api_values(obj.show)
|
show = app.logger.convert_show_values_to_db_api_values(obj.show)
|
||||||
if show is not None:
|
if show is not None:
|
||||||
app.logger.insert_into_logs(nbxmpp.JID(obj.jid).getStripped(),
|
app.logger.insert_into_logs(nbxmpp.JID(obj.jid).getStripped(),
|
||||||
time_time(),
|
time_time(),
|
||||||
KindConstant.STATUS,
|
KindConstant.STATUS,
|
||||||
message=obj.status,
|
message=obj.status,
|
||||||
show=show)
|
show=show)
|
||||||
|
|
||||||
def _nec_gc_presence_received(self, obj):
|
def _nec_gc_presence_received(self, obj):
|
||||||
if obj.conn.name != self.name:
|
if obj.conn.name != self.name:
|
||||||
|
@ -1185,11 +1185,11 @@ class ConnectionHandlersBase:
|
||||||
# usually it hold description and can be send at each connection
|
# usually it hold description and can be send at each connection
|
||||||
# so don't store it in logs
|
# so don't store it in logs
|
||||||
app.logger.insert_into_logs(obj.jid,
|
app.logger.insert_into_logs(obj.jid,
|
||||||
obj.timestamp,
|
obj.timestamp,
|
||||||
KindConstant.GC_MSG,
|
KindConstant.GC_MSG,
|
||||||
message=obj.msgtxt,
|
message=obj.msgtxt,
|
||||||
contact_name=obj.nick,
|
contact_name=obj.nick,
|
||||||
additional_data=obj.additional_data)
|
additional_data=obj.additional_data)
|
||||||
# store in memory time of last message logged.
|
# store in memory time of last message logged.
|
||||||
# this will also be saved in rooms_last_message_time table
|
# this will also be saved in rooms_last_message_time table
|
||||||
# when we quit this muc
|
# when we quit this muc
|
||||||
|
@ -1207,10 +1207,10 @@ class ConnectionHandlersBase:
|
||||||
|
|
||||||
if session.is_loggable():
|
if session.is_loggable():
|
||||||
app.logger.insert_into_logs(nbxmpp.JID(frm).getStripped(),
|
app.logger.insert_into_logs(nbxmpp.JID(frm).getStripped(),
|
||||||
tim,
|
tim,
|
||||||
KindConstant.ERROR,
|
KindConstant.ERROR,
|
||||||
message=error_msg,
|
message=error_msg,
|
||||||
subject=subject)
|
subject=subject)
|
||||||
|
|
||||||
app.nec.push_incoming_event(MessageErrorEvent(None, conn=self,
|
app.nec.push_incoming_event(MessageErrorEvent(None, conn=self,
|
||||||
fjid=frm, error_code=msg.getErrorCode(), error_msg=error_msg,
|
fjid=frm, error_code=msg.getErrorCode(), error_msg=error_msg,
|
||||||
|
|
|
@ -869,11 +869,11 @@ class GcPresenceReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
|
||||||
if show is not None:
|
if show is not None:
|
||||||
fjid = nbxmpp.JID(self.fjid)
|
fjid = nbxmpp.JID(self.fjid)
|
||||||
app.logger.insert_into_logs(fjid.getStripped(),
|
app.logger.insert_into_logs(fjid.getStripped(),
|
||||||
time_time(),
|
time_time(),
|
||||||
KindConstant.GCSTATUS,
|
KindConstant.GCSTATUS,
|
||||||
contact_name=fjid.getResource(),
|
contact_name=fjid.getResource(),
|
||||||
message=st,
|
message=st,
|
||||||
show=show)
|
show=show)
|
||||||
if self.avatar_sha == '':
|
if self.avatar_sha == '':
|
||||||
# contact has no avatar
|
# contact has no avatar
|
||||||
puny_nick = helpers.sanitize_filename(self.nick)
|
puny_nick = helpers.sanitize_filename(self.nick)
|
||||||
|
|
Loading…
Add table
Reference in a new issue