From 9dccde74826bdc75ef8bdf394746e3e1ca62e712 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Thu, 11 Jun 2020 13:48:46 -0400 Subject: [PATCH] Porting new-updates-sync to python3 Signed-off-by: Mohan Boddu --- roles/bodhi2/backend/files/new-updates-sync | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync index 8dcaf56c5e..bffcc05a1a 100755 --- a/roles/bodhi2/backend/files/new-updates-sync +++ b/roles/bodhi2/backend/files/new-updates-sync @@ -1,4 +1,4 @@ -#!/bin/python2 +#!/usr/bin/python3 import copy import fedmsg import functools @@ -235,7 +235,7 @@ def rsync(from_path, to_path, excludes=[], link_dest=None, delete=False): results = {'num_bytes': 0, 'num_deleted': 0} - for line in stdout.split('\n'): + for line in stdout.encode().split('\n'): if 'Literal data' in line: results['num_bytes'] = int(line.split()[2]) elif 'deleting ' in line: