Porting new-updates-sync to python3

Signed-off-by: Mohan Boddu <mboddu@bhujji.com>
This commit is contained in:
Mohan Boddu 2020-06-11 13:48:46 -04:00
parent 5ce884517f
commit 9dccde7482

View file

@ -1,4 +1,4 @@
#!/bin/python2 #!/usr/bin/python3
import copy import copy
import fedmsg import fedmsg
import functools import functools
@ -235,7 +235,7 @@ def rsync(from_path, to_path, excludes=[], link_dest=None, delete=False):
results = {'num_bytes': 0, results = {'num_bytes': 0,
'num_deleted': 0} 'num_deleted': 0}
for line in stdout.split('\n'): for line in stdout.encode().split('\n'):
if 'Literal data' in line: if 'Literal data' in line:
results['num_bytes'] = int(line.split()[2]) results['num_bytes'] = int(line.split()[2])
elif 'deleting ' in line: elif 'deleting ' in line: