netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Garver <eric@garver.life>
To: Shekhar Sharma <shekhar250198@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft v1 ] py: nftables.py: fix python3
Date: Tue, 28 May 2019 10:09:56 -0400	[thread overview]
Message-ID: <20190528140956.yumy2xfl4edypdba@egarver.localdomain> (raw)
In-Reply-To: <20190524184950.468164-1-shekhar250198@gmail.com>

On Sat, May 25, 2019 at 12:19:50AM +0530, Shekhar Sharma wrote:
> This patch converts the 'nftables.py' file (nftables/py/nftables.py) to run on both python2 and python3.
> 
> 
> Signed-off-by: Shekhar Sharma <shekhar250198@gmail.com>
> ---
>  py/nftables.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/py/nftables.py b/py/nftables.py
> index 33cd2dfd..badcfa5c 100644
> --- a/py/nftables.py
> +++ b/py/nftables.py
> @@ -297,7 +297,7 @@ class Nftables:
>          val = self.nft_ctx_output_get_debug(self.__ctx)
>  
>          names = []
> -        for n,v in self.debug_flags.items():
> +        for n,v in list(self.debug_flags.items()):
>              if val & v:
>                  names.append(n)
>                  val &= ~v

Are you fixing an issue here? I don't think the conversion to list is
necessary. The dictionary view can still be iterated. The dictionary is
not being modified.

  reply	other threads:[~2019-05-28 14:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24 18:49 [PATCH nft v1 ] py: nftables.py: fix python3 Shekhar Sharma
2019-05-28 14:09 ` Eric Garver [this message]
2019-05-28 14:15   ` shekhar sharma

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=20190528140956.yumy2xfl4edypdba@egarver.localdomain \
    --to=eric@garver.life \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=shekhar250198@gmail.com \
    /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).