@@ -509,23 +509,23 @@ def register(ptype, **kwargs):
509
509
fp_out = open (r ("../addons/%(gramps_version)s/listings/" ) + ("addons-%s.new" % lang ), "w" , encoding = "utf-8" )
510
510
added = False
511
511
for line in fp_in :
512
- if line in already_added :
513
- continue
514
512
dictionary = eval (line )
513
+ if ("""{"t":'%(t)s',"i":'%(i)s',"n":'%(n)s'}""" % dictionary ) in already_added :
514
+ continue
515
515
if cmd_arg + ".addon.tgz" in line and plugin ["t" ] == dictionary ["t" ] and not added :
516
516
#print("UPDATED")
517
517
print ("""{"t":'%(t)s',"i":'%(i)s',"n":'%(n)s',"v":'%(v)s',"g":'%(g)s',"d":'%(d)s',"z":'%(z)s'}""" % plugin , file = fp_out )
518
518
added = True
519
- already_added .append ("""{"t":'%(t)s',"i":'%(i)s',"n":'%(n)s',"v":'%(v)s',"g":'%(g)s',"d":'%(d)s',"z":'%(z)s' }""" % plugin )
519
+ already_added .append ("""{"t":'%(t)s',"i":'%(i)s',"n":'%(n)s'}""" % plugin )
520
520
elif ((plugin ["t" ], plugin ["i" ]) < (dictionary ["t" ], dictionary ["i" ])) and not added :
521
521
#print("ADDED in middle")
522
522
print ("""{"t":'%(t)s',"i":'%(i)s',"n":'%(n)s',"v":'%(v)s',"g":'%(g)s',"d":'%(d)s',"z":'%(z)s'}""" % plugin , file = fp_out )
523
523
added = True
524
524
print (line , end = "" , file = fp_out )
525
- already_added .append ("""{"t":'%(t)s',"i":'%(i)s',"n":'%(n)s',"v":'%(v)s',"g":'%(g)s',"d":'%(d)s',"z":'%(z)s' }""" % plugin )
525
+ already_added .append ("""{"t":'%(t)s',"i":'%(i)s',"n":'%(n)s'}""" % plugin )
526
526
else :
527
527
print (line , end = "" , file = fp_out )
528
- already_added .append (line )
528
+ already_added .append ("""{"t":'%(t)s',"i":'%(i)s',"n":'%(n)s'}""" % dictionary )
529
529
if not added :
530
530
if ("""{"t":'%(t)s',"i":'%(i)s',"n":'%(n)s',"v":'%(v)s',"g":'%(g)s',"d":'%(d)s',"z":'%(z)s'}""" % plugin ) not in already_added :
531
531
#print("ADDED at end")
0 commit comments