From 4e90cb29bae84582ae914cdf0c1f1c3c620410a6 Mon Sep 17 00:00:00 2001 From: Damien Crier Date: Mon, 8 Feb 2016 13:35:51 +0100 Subject: [PATCH] [FIX] flake8 errors --- asterisk_click2dial/asterisk_click2dial.py | 8 ++++---- base_phone/wizard/reformat_all_phonenumbers.py | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/asterisk_click2dial/asterisk_click2dial.py b/asterisk_click2dial/asterisk_click2dial.py index e9c9d9f..000c05c 100644 --- a/asterisk_click2dial/asterisk_click2dial.py +++ b/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 diff --git a/base_phone/wizard/reformat_all_phonenumbers.py b/base_phone/wizard/reformat_all_phonenumbers.py index 252ab1d..7cc28c0 100644 --- a/base_phone/wizard/reformat_all_phonenumbers.py +++ b/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' % (