Fix dynamic Python items() in deleteIntfs()
This commit is contained in:
+2
-2
@@ -411,7 +411,7 @@ class Node( object ):
|
|||||||
# Warning: this can fail with large numbers of fds!
|
# Warning: this can fail with large numbers of fds!
|
||||||
out, err = popen.communicate()
|
out, err = popen.communicate()
|
||||||
exitcode = popen.wait()
|
exitcode = popen.wait()
|
||||||
return out, err, exitcode
|
return decode( out ), decode( err ), exitcode
|
||||||
|
|
||||||
# Interface management, configuration, and routing
|
# Interface management, configuration, and routing
|
||||||
|
|
||||||
@@ -500,7 +500,7 @@ class Node( object ):
|
|||||||
# explicitly so that we won't get errors if we run before they
|
# explicitly so that we won't get errors if we run before they
|
||||||
# have been removed by the kernel. Unfortunately this is very slow,
|
# have been removed by the kernel. Unfortunately this is very slow,
|
||||||
# at least with Linux kernels before 2.6.33
|
# at least with Linux kernels before 2.6.33
|
||||||
for intf in self.intfs.values():
|
for intf in list( self.intfs.values() ):
|
||||||
# Protect against deleting hardware interfaces
|
# Protect against deleting hardware interfaces
|
||||||
if ( self.name in intf.name ) or ( not checkName ):
|
if ( self.name in intf.name ) or ( not checkName ):
|
||||||
intf.delete()
|
intf.delete()
|
||||||
|
|||||||
Reference in New Issue
Block a user