Parcourir la source

[1858] cleanup: removed unnecessary list() conversion from dict values.

dict.values() is an iterable, so we can use it directly in the for statement.
(and we don't modify components within the loop).
JINMEI Tatuya il y a 12 ans
Parent
commit
9dac9afb25
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  1. 1 2
      src/bin/bind10/bind10_src.py.in

+ 1 - 2
src/bin/bind10/bind10_src.py.in

@@ -712,8 +712,7 @@ class BoB:
 
         '''
         logmsg = BIND10_SEND_SIGKILL if forceful else BIND10_SEND_SIGTERM
-        # TODO: we should be able to skip list()
-        for component in list(self.components.values()):
+        for component in self.components.values():
             logger.info(logmsg, component.name(), component.pid())
             try:
                 component.kill(forceful)