Parcourir la source

[master] Use alternate syntax for shallow copy

This is recommended by:
http://docs.python.org/3/library/copy.html
Mukund Sivaraman il y a 11 ans
Parent
commit
351b82d0ed
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/lib/python/isc/memmgr/builder.py

+ 1 - 1
src/lib/python/isc/memmgr/builder.py

@@ -68,7 +68,7 @@ class MemorySegmentBuilder:
                     self._cv.wait()
                 # Move the queue content to a local queue. Be careful of
                 # not making assignments to reference variables.
-                local_command_queue = list(self._command_queue)
+                local_command_queue = self._command_queue[:]
                 del self._command_queue[:]
 
                 # Run commands passed in the command queue sequentially