linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Ruffell <matthew.ruffell@canonical.com>
To: linux-nfs@vger.kernel.org
Cc: Matthew Ruffell <matthew.ruffell@canonical.com>
Subject: [PATCH] nfsiostat: replace 'list' reserved word
Date: Mon, 25 Mar 2019 10:33:18 +1300	[thread overview]
Message-ID: <20190324213318.18296-1-matthew.ruffell@canonical.com> (raw)

list is a reserved word in python and should not be used as a variable
name. Changing list to devicelist for list_nfs_mounts()

Fixes: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1821261

Signed-off-by: Matthew Ruffell <matthew.ruffell@canonical.com>
---
 tools/nfs-iostat/nfs-iostat.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py
index 7cbe543..dec0e86 100644
--- a/tools/nfs-iostat/nfs-iostat.py
+++ b/tools/nfs-iostat/nfs-iostat.py
@@ -493,20 +493,20 @@ def list_nfs_mounts(givenlist, mountstats):
        return a full list if the given list is empty -
        may return an empty list if none found
     """
-    list = []
+    devicelist = []
     if len(givenlist) > 0:
         for device in givenlist:
             stats = DeviceData()
             stats.parse_stats(mountstats[device])
             if stats.is_nfs_mountpoint():
-                list += [device]
+                devicelist += [device]
     else:
         for device, descr in mountstats.items():
             stats = DeviceData()
             stats.parse_stats(descr)
             if stats.is_nfs_mountpoint():
-                list += [device]
-    return list
+                devicelist += [device]
+    return devicelist
 
 def iostat_command(name):
     """iostat-like command for NFS mount points
-- 
2.19.1


             reply	other threads:[~2019-03-24 21:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-24 21:33 Matthew Ruffell [this message]
2019-03-25 23:23 ` [PATCH] nfsiostat: replace 'list' reserved word J. Bruce Fields
2019-03-28 20:06 ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190324213318.18296-1-matthew.ruffell@canonical.com \
    --to=matthew.ruffell@canonical.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).