diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2019-11-26 21:28:20 +0530 |
---|---|---|
committer | Valerii Ponomarov <vponomar@redhat.com> | 2019-12-02 20:07:31 +0530 |
commit | 50453885291f5c5341ceb3a732be9a068873cffe (patch) | |
tree | 6597405e6b6052adff32fc166922e7e07f8369f3 /glustolibs-io/shared_files/tools | |
parent | 08b727842bc66603e3b8d1160ee4b15051b0cd20 (diff) |
[py2to3] Fix files located in the 'glustolibs-io' dir
Do following things in the files from the mentioned directory:
- Make it be python 2/3 compatible.
- Fix pep8 issues.
- Place imports in alphabetical order.
- Improve some parts for the better readability.
- Add comma separators in the setup.py for it's classifiers.
Before it was mistakenly made as one long line.
Change-Id: I3f0a5921a5386275a8a35bf2f22ee3952700e490
Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'glustolibs-io/shared_files/tools')
-rw-r--r-- | glustolibs-io/shared_files/tools/fio/run_fio.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/glustolibs-io/shared_files/tools/fio/run_fio.py b/glustolibs-io/shared_files/tools/fio/run_fio.py index ea20175cb..f65ad93d3 100644 --- a/glustolibs-io/shared_files/tools/fio/run_fio.py +++ b/glustolibs-io/shared_files/tools/fio/run_fio.py @@ -15,17 +15,16 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import os import argparse import fileinput +import os import re import subprocess import time def generate_workload_using_fio(root_dirname, ini_file): - """ - Populates data in the given directory using fio tool. + """Populate data in the given directory using fio tool. Args: root_dirname (str): Directory name @@ -54,16 +53,15 @@ if __name__ == "__main__": # http://git.kernel.dk/?p=fio.git;a=blob;f=README; # h=5fa37f3eed33a15a15a38836cf0080edc81688fd;hb=HEAD - parser = argparse.ArgumentParser(prog="test_fio.py", - description=("Generate workload " - "using fio")) + parser = argparse.ArgumentParser( + prog="test_fio.py", + description=("Generate workload using fio")) parser.add_argument( 'dir', metavar='DIR', type=str, help="Directory on which IO has to be performed") - parser.add_argument('--job-files', - metavar=('job_files'), dest='job_files', - help="space separated absolute paths of " - "ini job files", required=True) + parser.add_argument( + '--job-files', metavar=('job_files'), dest='job_files', + help="space separated absolute paths of ini job files", required=True) args = parser.parse_args() root_dirname = args.dir ini_files_list = args.job_files.split() |