* [PATCH] nfsiostat: replace 'list' reserved word
@ 2019-03-24 21:33 Matthew Ruffell
2019-03-25 23:23 ` J. Bruce Fields
2019-03-28 20:06 ` Steve Dickson
0 siblings, 2 replies; 3+ messages in thread
From: Matthew Ruffell @ 2019-03-24 21:33 UTC (permalink / raw)
To: linux-nfs; +Cc: Matthew Ruffell
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nfsiostat: replace 'list' reserved word
2019-03-24 21:33 [PATCH] nfsiostat: replace 'list' reserved word Matthew Ruffell
@ 2019-03-25 23:23 ` J. Bruce Fields
2019-03-28 20:06 ` Steve Dickson
1 sibling, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2019-03-25 23:23 UTC (permalink / raw)
To: Matthew Ruffell; +Cc: linux-nfs, steved
Adding steved to cc.--b.
On Mon, Mar 25, 2019 at 10:33:18AM +1300, Matthew Ruffell wrote:
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nfsiostat: replace 'list' reserved word
2019-03-24 21:33 [PATCH] nfsiostat: replace 'list' reserved word Matthew Ruffell
2019-03-25 23:23 ` J. Bruce Fields
@ 2019-03-28 20:06 ` Steve Dickson
1 sibling, 0 replies; 3+ messages in thread
From: Steve Dickson @ 2019-03-28 20:06 UTC (permalink / raw)
To: Matthew Ruffell, linux-nfs
On 3/24/19 5:33 PM, Matthew Ruffell wrote:
> 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>
Committed...
steved.
> ---
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-28 20:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-24 21:33 [PATCH] nfsiostat: replace 'list' reserved word Matthew Ruffell
2019-03-25 23:23 ` J. Bruce Fields
2019-03-28 20:06 ` Steve Dickson
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).