modify python2 function to python3

This commit is contained in:
eulerstorage 2020-03-18 20:43:12 +08:00
parent 4a431ca7b1
commit d2b68cacac
2 changed files with 8 additions and 9 deletions

View File

@ -7,8 +7,8 @@ Source: http://brick.kernel.dk/snaps/blktrace-%{version}.tar.bz2
URL: https://git.kernel.dk/cgit/blktrace
BuildRequires: gcc, git, xz, libaio-devel, python3, librsvg2-devel blktrace sysstat theora-tools
Provides: iowatcher
Obsoletes: iowatcher
Provides: iowatcher = %{version}-%{release}
Obsoletes: iowatcher < %{version}-%{release}
Requires: python3
Patch0: blktrace-fix-btt-overflow.patch

View File

@ -1,11 +1,11 @@
From 0a4798b479a46c1f804901fd227fbd9bd84da32e Mon Sep 17 00:00:00 2001
From 007e3250a86bfaf78c3729197cc2add76de4aacc Mon Sep 17 00:00:00 2001
From: eulerstorage <eulerstorage@huawei.com>
Date: Wed, 18 Mar 2020 18:31:54 +0800
Subject: [PATCH] 456
Date: Wed, 18 Mar 2020 20:37:33 +0800
Subject: [PATCH] 45
---
btt/bno_plot.py | 14 +++++++-------
btt/btt_plot.py | 6 ++++----
btt/btt_plot.py | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/btt/bno_plot.py b/btt/bno_plot.py
@ -54,7 +54,7 @@ index aa92480..3506f33 100644
os.chdir(tmpdir)
os.system(cmd)
diff --git a/btt/btt_plot.py b/btt/btt_plot.py
index b81dad5..6e403ef 100755
index b81dad5..79bdfad 100755
--- a/btt/btt_plot.py
+++ b/btt/btt_plot.py
@@ -163,7 +163,7 @@ def get_data(files):
@ -72,10 +72,9 @@ index b81dad5..6e403ef 100755
(opts, args) = getopt.getopt(args[1:], s_opts, l_opts)
- except getopt.error, msg:
+ except getopt.error as msg:
print >>sys.stderr, msg
print >>sys.stderr, msg
fatal(__doc__)
for (o, a) in opts:
@@ -314,7 +314,7 @@ def generate_output(type, db):
ofile = '%s.png' % type