From dbca39b57cb14cc0ab096bf38a924ef988be0766 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 28 Mar 2018 16:01:30 +0100 Subject: [PATCH] Modify processcsv.py for Python 3. --- processcsv.py | 4 ++-- virt-top.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/processcsv.py b/processcsv.py index e74fb88..4812263 100755 --- a/processcsv.py +++ b/processcsv.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # https://bugzilla.redhat.com/show_bug.cgi?id=665817 # @@ -18,7 +18,7 @@ import csv rows = csv.reader (sys.stdin) # Get the header row. -header = rows.next () +header = next(rows) # Find the index of the 'Hostname' and 'Time' cols (usually first two). hostname_i = header.index ("Hostname") diff --git a/virt-top.spec b/virt-top.spec index 3002b52..c2f630d 100644 --- a/virt-top.spec +++ b/virt-top.spec @@ -3,7 +3,7 @@ Name: virt-top Version: 1.0.8 -Release: 29%{?dist} +Release: 30%{?dist} Summary: Utility like top(1) for displaying virtualization stats License: GPLv2+ @@ -166,6 +166,9 @@ install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/ %changelog +* Wed Mar 28 2018 Richard W.M. Jones - 1.0.8-30 +- Modify processcsv.py for Python 3. + * Fri Feb 09 2018 Fedora Release Engineering - 1.0.8-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild