代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/blktrace 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 007e3250a86bfaf78c3729197cc2add76de4aacc Mon Sep 17 00:00:00 2001
From: eulerstorage <eulerstorage@huawei.com>
Date: Wed, 18 Mar 2020 20:37:33 +0800
Subject: [PATCH] 45
---
btt/bno_plot.py | 14 +++++++-------
btt/btt_plot.py | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/btt/bno_plot.py b/btt/bno_plot.py
index aa92480..3506f33 100644
--- a/btt/bno_plot.py
+++ b/btt/bno_plot.py
@@ -60,14 +60,14 @@ def parse_args(in_args):
try:
(opts, args) = getopt.getopt(in_args, s_opts, l_opts)
- except getopt.error, msg:
+ except getopt.error as msg:
print >>sys.stderr, msg
print >>sys.stderr, __doc__
sys.exit(1)
for (o, a) in opts:
if o in ('-h', '--help'):
- print __doc__
+ print (__doc__)
sys.exit(0)
elif o in ('-v', '--verbose'):
verbose += 1
@@ -84,10 +84,10 @@ if __name__ == '__main__':
(bnos, keys_below) = parse_args(sys.argv[1:])
if verbose:
- print 'Using files:',
- for bno in bnos: print bno,
- if keys_below: print '\nKeys are to be placed below graph'
- else: print ''
+ print ('Using files:'),
+ for bno in bnos: print (bno),
+ if keys_below: print ('\nKeys are to be placed below graph')
+ else: print ('')
tmpdir = tempfile.mktemp()
os.mkdir(tmpdir)
@@ -116,7 +116,7 @@ if __name__ == '__main__':
if pid == 0:
cmd = 'gnuplot %s/plot.cmds -' % tmpdir
- if verbose: print 'Executing %s' % cmd
+ if verbose: print ('Executing %s' % cmd)
os.chdir(tmpdir)
os.system(cmd)
diff --git a/btt/btt_plot.py b/btt/btt_plot.py
index b81dad5..79bdfad 100755
--- a/btt/btt_plot.py
+++ b/btt/btt_plot.py
@@ -163,7 +163,7 @@ def get_data(files):
if not os.path.exists(file):
fatal('%s not found' % file)
elif verbose:
- print 'Processing %s' % file
+ print ('Processing %s' % file)
xs = []
ys = []
@@ -214,7 +214,7 @@ def parse_args(args):
try:
(opts, args) = getopt.getopt(args[1:], s_opts, l_opts)
- except getopt.error, msg:
+ except getopt.error as msg:
print >>sys.stderr, msg
fatal(__doc__)
@@ -314,7 +314,7 @@ def generate_output(type, db):
ofile = '%s.png' % type
if verbose:
- print 'Generating plot into %s' % ofile
+ print ('Generating plot into %s' % ofile)
fig = plt.figure(figsize=plot_size)
ax = fig.add_subplot(111)
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。