Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

bug: label arguments for router.register to prevent misassignment #648

Merged
merged 2 commits into from
Sep 16, 2016

Conversation

jrconlin
Copy link
Member

@jrconlin jrconlin commented Sep 5, 2016

Serial argument assignment can lead to misassignment of arguments in
some cases. It's best to be explicit where one can be.

closes #642

@@ -44,7 +44,7 @@ def __init__(self, ap_settings, router_conf):
self._connect()
self.log.debug("Starting APNS router...")

def register(self, uaid, router_data, *args, **kwargs):
def register(self, uaid, router_data={}, *args, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we really don't want the mutable default (router_data={}) here. router_data seems to be always be required, so it should continue being a positional argument to enforce that

Serial argument assignment can lead to misassignment of arguments in
some cases. It's best to be explicit where one can be.

closes #642
@jrconlin jrconlin changed the title WIP: bug: label arguments for router.register to prevent misassignment bug: label arguments for router.register to prevent misassignment Sep 12, 2016
@codecov-io
Copy link

codecov-io commented Sep 12, 2016

Current coverage is 100% (diff: 100%)

Merging #648 into master will not change coverage

@@           master   #648   diff @@
====================================
  Files          45     45          
  Lines        9171   9171          
  Methods         0      0          
  Messages        0      0          
  Branches        0      0          
====================================
  Hits         9171   9171          
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update ee633a5...417b58b

Copy link
Member

@bbangert bbangert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

@bbangert bbangert merged commit b1a7e2d into master Sep 16, 2016
@bbangert bbangert deleted the bug/642 branch September 16, 2016 17:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SenderID is being dropped before going to GCM
4 participants