remove redundant parameters

This commit is contained in:
Eric House 2013-05-22 05:51:33 -07:00
parent 7d81083d7d
commit 11709b21bd

View file

@ -109,12 +109,12 @@ def asGCMIds(con, devids, typ):
cur.execute( query ) cur.execute( query )
return [elem[0] for elem in cur.fetchall()] return [elem[0] for elem in cur.fetchall()]
def notifyGCM( target, devids, typ, msg, connname, hid ): def notifyGCM( devids, typ, target ):
success = False success = False
if typ == DEVTYPE_GCM: if typ == DEVTYPE_GCM:
if 3 <= target['clntVers']: if 3 <= target['clntVers']:
connname = "%s/%d" % (connname, hid) connname = "%s/%d" % (target['connname'], target['hid'])
data = { 'msg64': msg, data = { 'msg64': target['msg64'],
'connname': connname, 'connname': connname,
} }
else: else:
@ -235,12 +235,8 @@ def main():
toDelete = [] toDelete = []
for devid in targets.keys(): for devid in targets.keys():
target = targets[devid] target = targets[devid]
connname = target['connname'] if notifyGCM( asGCMIds(g_con, [devid], typ), typ, target )\
hid = target['hid'] and 3 <= target['clntVers']:
msg = target['msg64']
if notifyGCM( target, asGCMIds( g_con, [devid], typ ), \
typ, msg, connname, hid ) \
and 3 <= target['clntVers']:
toDelete.append( str(target['id']) ) toDelete.append( str(target['id']) )
pruneSent( devids ) pruneSent( devids )
deleteMsgs( g_con, toDelete ) deleteMsgs( g_con, toDelete )