Browse Source

Merge pull request #80 from damdam-s/fix_flake8

[FIX] flake8 errors
pull/84/head
Yannick Vaucher 8 years ago
parent
commit
719e4c8cb0
  1. 8
      asterisk_click2dial/asterisk_click2dial.py
  2. 5
      base_phone/wizard/reformat_all_phonenumbers.py

8
asterisk_click2dial/asterisk_click2dial.py

@ -255,15 +255,15 @@ class asterisk_server(orm.Model):
break
# 6 = Up
if (
chan.get('ChannelState') == '6'
and sip_account in chan.get('BridgedChannel', '')):
chan.get('ChannelState') == '6' and
sip_account in chan.get('BridgedChannel', '')):
_logger.debug("Found a matching Event in 'Up' state")
calling_party_number = chan.get('CallerIDNum')
break
# Compatibility with Asterisk 1.4
if (
chan.get('State') == 'Up'
and sip_account in chan.get('Link', '')):
chan.get('State') == 'Up' and
sip_account in chan.get('Link', '')):
_logger.debug("Found a matching Event in 'Up' state")
calling_party_number = chan.get('CallerIDNum')
break

5
base_phone/wizard/reformat_all_phonenumbers.py

@ -78,9 +78,8 @@ class reformat_all_phonenumbers(models.TransientModel):
obj._description, name, unicode(e)))
continue
if any(
[init_entry.get(field)
!= entry.get(field) for field
in fields]):
[init_entry.get(field) != entry.get(field) for
field in fields]):
entry.pop('id')
logger.info(
'[%s] Reformating phone number: FROM %s TO %s' % (

Loading…
Cancel
Save