torrent: move torrentjsonstats to python3

This is an old python2 script. I had manually hacked it when I moved
torrent to rhel9, but a recent playbook run over everything put the old
python2 one back. So, lets fix it for once in ansible.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2024-01-17 09:24:36 -08:00
parent 910e5cebf3
commit 134510ba86

View file

@ -8,7 +8,7 @@ whitelist='/srv/torrent/btholding/whitelist'
if len(sys.argv) < 2:
print "Usage: torrentstats.py /path/to/torrent/stats/file"
print("Usage: torrentstats.py /path/to/torrent/stats/file")
sys.exit(1)
torrents = {}
@ -34,4 +34,4 @@ for line in open(sys.argv[1],'r').readlines():
tdict['seeds'] = 1
tlist.append(tdict)
print simplejson.dumps(tlist)
print(simplejson.dumps(tlist))