diff mbox

[U-Boot,v2,09/10] patman: Rename 'list' variable in MakeCcFile()

Message ID 20170529213132.21217-10-sjg@chromium.org
State Accepted
Commit a44f4fb72bcb954bf38385e2953f7320b9f25aa3
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass May 29, 2017, 9:31 p.m. UTC
This is not a good variable name in Python because 'list' is a type. It
shows up highlighted in some editors. Rename it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 tools/patman/series.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Simon Glass June 7, 2017, 1:47 a.m. UTC | #1
This is not a good variable name in Python because 'list' is a type. It
shows up highlighted in some editors. Rename it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 tools/patman/series.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Applied to u-boot-dm, thanks!
diff mbox

Patch

diff --git a/tools/patman/series.py b/tools/patman/series.py
index 395b9ea99b..d3947a7c2a 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -223,20 +223,20 @@  class Series(dict):
         fd = open(fname, 'w')
         all_ccs = []
         for commit in self.commits:
-            list = []
+            cc = []
             if process_tags:
-                list += gitutil.BuildEmailList(commit.tags,
+                cc += gitutil.BuildEmailList(commit.tags,
                                                raise_on_error=raise_on_error)
-            list += gitutil.BuildEmailList(commit.cc_list,
+            cc += gitutil.BuildEmailList(commit.cc_list,
                                            raise_on_error=raise_on_error)
-            if type(add_maintainers) == type(list):
-                list += add_maintainers
+            if type(add_maintainers) == type(cc):
+                cc += add_maintainers
             elif add_maintainers:
-                list += get_maintainer.GetMaintainer(commit.patch)
-            list = [m.encode('utf-8') if type(m) != str else m for m in list]
-            all_ccs += list
-            print(commit.patch, ', '.join(set(list)), file=fd)
-            self._generated_cc[commit.patch] = list
+                cc += get_maintainer.GetMaintainer(commit.patch)
+            cc = [m.encode('utf-8') if type(m) != str else m for m in cc]
+            all_ccs += cc
+            print(commit.patch, ', '.join(set(cc)), file=fd)
+            self._generated_cc[commit.patch] = cc
 
         if cover_fname:
             cover_cc = gitutil.BuildEmailList(self.get('cover_cc', ''))