From d2b68cacac7c8cc57b34c6ee6c08e05584cd2500 Mon Sep 17 00:00:00 2001 From: eulerstorage Date: Wed, 18 Mar 2020 20:43:12 +0800 Subject: [PATCH] modify python2 function to python3 --- blktrace.spec | 4 ++-- modify-python2-expression-to-python3.patch | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/blktrace.spec b/blktrace.spec index 8cab730..1a1c7b8 100644 --- a/blktrace.spec +++ b/blktrace.spec @@ -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 diff --git a/modify-python2-expression-to-python3.patch b/modify-python2-expression-to-python3.patch index fefcb6c..c49cc4c 100644 --- a/modify-python2-expression-to-python3.patch +++ b/modify-python2-expression-to-python3.patch @@ -1,11 +1,11 @@ -From 0a4798b479a46c1f804901fd227fbd9bd84da32e Mon Sep 17 00:00:00 2001 +From 007e3250a86bfaf78c3729197cc2add76de4aacc Mon Sep 17 00:00:00 2001 From: eulerstorage -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