mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-27 07:58:49 +01:00
remove redundant parameters
This commit is contained in:
parent
7d81083d7d
commit
11709b21bd
1 changed files with 5 additions and 9 deletions
|
@ -109,12 +109,12 @@ def asGCMIds(con, devids, typ):
|
|||
cur.execute( query )
|
||||
return [elem[0] for elem in cur.fetchall()]
|
||||
|
||||
def notifyGCM( target, devids, typ, msg, connname, hid ):
|
||||
def notifyGCM( devids, typ, target ):
|
||||
success = False
|
||||
if typ == DEVTYPE_GCM:
|
||||
if 3 <= target['clntVers']:
|
||||
connname = "%s/%d" % (connname, hid)
|
||||
data = { 'msg64': msg,
|
||||
connname = "%s/%d" % (target['connname'], target['hid'])
|
||||
data = { 'msg64': target['msg64'],
|
||||
'connname': connname,
|
||||
}
|
||||
else:
|
||||
|
@ -235,12 +235,8 @@ def main():
|
|||
toDelete = []
|
||||
for devid in targets.keys():
|
||||
target = targets[devid]
|
||||
connname = target['connname']
|
||||
hid = target['hid']
|
||||
msg = target['msg64']
|
||||
if notifyGCM( target, asGCMIds( g_con, [devid], typ ), \
|
||||
typ, msg, connname, hid ) \
|
||||
and 3 <= target['clntVers']:
|
||||
if notifyGCM( asGCMIds(g_con, [devid], typ), typ, target )\
|
||||
and 3 <= target['clntVers']:
|
||||
toDelete.append( str(target['id']) )
|
||||
pruneSent( devids )
|
||||
deleteMsgs( g_con, toDelete )
|
||||
|
|
Loading…
Add table
Reference in a new issue