fix coding style: use 'is' operator when comparing object to None. put space around '%' operator. remove redundant str() on arguments.
This commit is contained in:
parent
5f96675d56
commit
e61e5db0b7
2 changed files with 8 additions and 8 deletions
|
@ -42,12 +42,12 @@ class JingleFileTransfer(JingleContent):
|
|||
self.callbacks['transport-info'] += [self.__on_transport_info]
|
||||
|
||||
self.file_props = file_props
|
||||
if file_props == None:
|
||||
if file_props is None:
|
||||
self.weinitiate = False
|
||||
else:
|
||||
self.weinitiate = True
|
||||
|
||||
if self.file_props != None:
|
||||
if self.file_props is not None:
|
||||
self.file_props['sender'] = session.ourjid
|
||||
self.file_props['session-type'] = 'jingle'
|
||||
self.file_props['sid'] = session.sid
|
||||
|
@ -56,7 +56,7 @@ class JingleFileTransfer(JingleContent):
|
|||
log.info("FT request: %s" % file_props)
|
||||
|
||||
|
||||
if transport == None:
|
||||
if transport is None:
|
||||
self.transport = JingleTransportICEUDP()
|
||||
|
||||
self.session = session
|
||||
|
|
|
@ -156,7 +156,7 @@ class ConnectionBytestream:
|
|||
field = _feature.setField('stream-method')
|
||||
field.delAttr('type')
|
||||
field.setValue(xmpp.NS_BYTESTREAM)
|
||||
log.info("send_file_approval: %s"%(str(iq)))
|
||||
log.info("send_file_approval: %s" % iq)
|
||||
self.connection.send(iq)
|
||||
|
||||
def send_file_rejection(self, file_props, code='403', typ=None):
|
||||
|
|
Loading…
Add table
Reference in a new issue