1
0
Fork 0

defirqaffinity: fix possible tracebacks

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2017-07-10 14:23:35 +02:00
parent ebf3132e58
commit ffd26efd48
No known key found for this signature in database
GPG key ID: D8E1C00E076E840B

View file

@ -117,9 +117,15 @@ fo.close()
interruptdirs = [ f for f in os.listdir(irqpath) if os.path.isdir(os.path.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")
try:
interruptdirs.remove("2")
except ValueError:
pass
# IRQ 0 - system timer (cannot be changed)
interruptdirs.remove("0")
try:
interruptdirs.remove("0")
except ValueError:
pass
for i in interruptdirs:
fname = irqpath + i + "/smp_affinity"