changeset 30386:ff896733c66a

memory: avoid shadowing variables inside a list comprehension
author Augie Fackler <augie@google.com>
date Thu, 10 Nov 2016 16:32:38 -0500
parents b573d7ca31c4
children ca74c076710e
files contrib/memory.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/memory.py	Thu Nov 10 03:15:41 2016 -0800
+++ b/contrib/memory.py	Thu Nov 10 16:32:38 2016 -0500
@@ -25,8 +25,8 @@
             key = parts[0][2:-1].lower()
             if key in result:
                 result[key] = int(parts[1])
-    ui.write_err(", ".join(["%s: %.1f MiB" % (key, value / 1024.0)
-                            for key, value in result.iteritems()]) + "\n")
+    ui.write_err(", ".join(["%s: %.1f MiB" % (k, v / 1024.0)
+                            for k, v in result.iteritems()]) + "\n")
 
 def extsetup(ui):
     atexit.register(memusage, ui)