diff mbox series

[v2,1/2] rpcctl: Use the correct function for setting xprts offline and online

Message ID 20220519154727.3577715-1-anna@kernel.org (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] rpcctl: Use the correct function for setting xprts offline and online | expand

Commit Message

Anna Schumaker May 19, 2022, 3:47 p.m. UTC
From: Anna Schumaker <Anna.Schumaker@Netapp.com>

Otherwise the tool will tell us:
    'Namespace' object has no attribute 'set_state'

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
---
 tools/rpcctl/rpcctl.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steve Dickson May 26, 2022, 5:34 p.m. UTC | #1
On 5/19/22 11:47 AM, Anna Schumaker wrote:
> From: Anna Schumaker <Anna.Schumaker@Netapp.com>
> 
> Otherwise the tool will tell us:
>      'Namespace' object has no attribute 'set_state'
> 
> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Committed... (tag: nfs-utils-2-6-2-rc5)

steved.
> ---
>   tools/rpcctl/rpcctl.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/rpcctl/rpcctl.py b/tools/rpcctl/rpcctl.py
> index b8df556b682c..2a69eacd3103 100755
> --- a/tools/rpcctl/rpcctl.py
> +++ b/tools/rpcctl/rpcctl.py
> @@ -142,7 +142,7 @@ class Xprt:
>                   xprt.set_state("offline")
>                   xprt.set_state("remove")
>               else:
> -                args.set_state(args.property)
> +                xprt.set_state(args.property)
>           print(xprt)
>   
>
diff mbox series

Patch

diff --git a/tools/rpcctl/rpcctl.py b/tools/rpcctl/rpcctl.py
index b8df556b682c..2a69eacd3103 100755
--- a/tools/rpcctl/rpcctl.py
+++ b/tools/rpcctl/rpcctl.py
@@ -142,7 +142,7 @@  class Xprt:
                 xprt.set_state("offline")
                 xprt.set_state("remove")
             else:
-                args.set_state(args.property)
+                xprt.set_state(args.property)
         print(xprt)