From d7d18cdb89edb4f0fd4ad4f12212bbfd81d42f13 Mon Sep 17 00:00:00 2001 From: Packit Date: Sep 14 2020 09:28:52 +0000 Subject: Apply patch iotop-0.6-python3.patch patch_name: iotop-0.6-python3.patch present_in_specfile: true --- diff --git a/sbin/iotop b/sbin/iotop index c5202d3..bb23a6e 100755 --- a/sbin/iotop +++ b/sbin/iotop @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # iotop: Display I/O usage of processes in a top like UI # Copyright (c) 2007, 2008 Guillaume Chazarain , GPLv2 # See iotop --help for some help diff --git a/sbin/iotop.python3 b/sbin/iotop.python3 new file mode 100755 index 0000000..c5202d3 --- /dev/null +++ b/sbin/iotop.python3 @@ -0,0 +1,20 @@ +#!/usr/bin/python +# iotop: Display I/O usage of processes in a top like UI +# Copyright (c) 2007, 2008 Guillaume Chazarain , GPLv2 +# See iotop --help for some help + +from __future__ import print_function +import sys + +try: + from iotop.ui import main +except ImportError as e: + print(e) + print('To run an uninstalled copy of iotop,') + print('launch iotop.py in the top directory') +else: + try: + main() + except KeyboardInterrupt: + pass + sys.exit(0)