mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-24 03:42:43 -06:00
Iterate over references instead of indexes
This commit is contained in:
parent
4baff08ce5
commit
855390ec43
1 changed files with 3 additions and 3 deletions
|
@ -110,9 +110,9 @@ class APNSProxy:
|
|||
resp = gzip.compress(plistlib.dumps(resp, fmt=plistlib.FMT_BINARY), mtime=0)
|
||||
body["b"] = resp
|
||||
body = plistlib.dumps(body, fmt=plistlib.FMT_BINARY)
|
||||
for f in range(len(payload.fields)):
|
||||
if payload.fields[f].id == 3:
|
||||
payload.fields[f].value = body
|
||||
for field in payload.fields:
|
||||
if field.id == 3:
|
||||
field.value = body
|
||||
break
|
||||
return payload
|
||||
|
||||
|
|
Loading…
Reference in a new issue