From 7d1febccaa6d73fbb00bb1626c37f599e5d555ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 20 Aug 2015 15:35:17 +0200 Subject: [PATCH] libexec: fixed listdir and isdir in defirqaffinity.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: rhbz#1252160 Signed-off-by: Jaroslav Škarvada --- libexec/defirqaffinity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/defirqaffinity.py b/libexec/defirqaffinity.py index 49f58bc..5cd84c9 100755 --- a/libexec/defirqaffinity.py +++ b/libexec/defirqaffinity.py @@ -57,7 +57,7 @@ def verify(shouldbemask): sys.exit(1) # now verify each /proc/irq/$num/smp_affinity - interruptdirs = [ f for f in listdir(irqpath) if isdir(join(irqpath,f)) ] + interruptdirs = [ f for f in os.listdir(irqpath) if os.path.isdir(join(irqpath,f)) ] # IRQ 2 - cascaded signals from IRQs 8-15 (any devices configured to use IRQ 2 will actually be using IRQ 9) interruptdirs.remove("2") # IRQ 0 - system timer (cannot be changed) @@ -103,7 +103,7 @@ fo.close() # now adjust each /proc/irq/$num/smp_affinity -interruptdirs = [ f for f in listdir(irqpath) if isdir(join(irqpath,f)) ] +interruptdirs = [ f for f in os.listdir(irqpath) if os.path.isdir(join(irqpath,f)) ] # IRQ 2 - cascaded signals from IRQs 8-15 (any devices configured to use IRQ 2 will actually be using IRQ 9) interruptdirs.remove("2")