From c41cceac5c73db3a494768bcdcc703148b914f4a Mon Sep 17 00:00:00 2001 From: Matthew Ruffell Date: Fri, 22 Mar 2019 12:08:13 +1300 Subject: [PATCH] nfsiostat: replace 'list' reserved word 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 --- 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