Iterate over references instead of indexes

This commit is contained in:
June 2023-08-20 17:15:26 -06:00 committed by GitHub
parent 4baff08ce5
commit 855390ec43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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