Porting new-updates-sync to python3
Signed-off-by: Mohan Boddu <mboddu@bhujji.com>
This commit is contained in:
parent
5ce884517f
commit
9dccde7482
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue