Fix python3 compatibility for iotop when installed
authorPaul Wise <pabs3@bonedaddy.net>
Mon, 4 Feb 2013 01:23:20 +0000 (4 09:23 +0800)
committerGuillaume Chazarain <chazarain@localhost>
Mon, 13 May 2013 19:55:21 +0000 (13 21:55 +0200)
sbin/iotop

index c4aa720..c5202d3 100755 (executable)
@@ -3,14 +3,15 @@
 # Copyright (c) 2007, 2008 Guillaume Chazarain <guichaz@gmail.com>, GPLv2
 # See iotop --help for some help
 
+from __future__ import print_function
 import sys
 
 try:
     from iotop.ui import main
-except ImportError, e:
-    print e
-    print 'To run an uninstalled copy of iotop,'
-    print 'launch iotop.py in the top directory'
+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()