netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shekhar Sharma <shekhar250198@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: Shekhar Sharma <shekhar250198@gmail.com>, Eric Garver <eric@garver.life>
Subject: Re: [PATCH nft v3]tests: py: fix python3.
Date: Fri, 24 May 2019 01:09:08 +0530	[thread overview]
Message-ID: <20190523193908.405176-1-shekhar250198@gmail.com> (raw)

Yes, the '\' can be removed, will remove it if I make any other changes in the future.

Thanks Eric, Pablo and Shivani for all your hints :-).

Shekhar

On Fri, May 24, 2019, 12:45 AM shekhar sharma <shekhar250198@gmail.com> wrote:
Yes, the '\' can be removed, will remove it if I make any other changes in the future.

Thanks Eric, Pablo and Shivani for all your hints :-). 

Shekhar 

On Fri, May 24, 2019, 12:41 AM Eric Garver <eric@garver.life> wrote:
On Thu, May 23, 2019 at 11:56:22PM +0530, Shekhar Sharma wrote:
> This version of the patch converts the file into python3 and also uses
> .format() method to make the print statments cleaner.
> 
> The version history of this topic is:
> 
> v1: conversion to py3 by changing print statements.
> v2: adds the '__future__' package for compatibility with py2 and py3.
> v3: solves the 'version' problem in argparse by adding a new argument.
> v4: uses .format() method to make the print statements cleaner.
> 
> 
> Signed-off-by: Shekhar Sharma <shekhar250198@gmail.com>
> ---

Acked-by: Eric Garver <eric@garver.life>

>  tests/py/nft-test.py | 47 ++++++++++++++++++++++++--------------------
>  1 file changed, 26 insertions(+), 21 deletions(-)
> 
> diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
> index 1c0afd0e..ab26d08d 100755
> --- a/tests/py/nft-test.py
> +++ b/tests/py/nft-test.py
[..]
> @@ -1353,15 +1358,15 @@ def main():
>      signal.signal(signal.SIGTERM, signal_handler)
>  
>      if os.getuid() != 0:
> -        print "You need to be root to run this, sorry"
> +        print("You need to be root to run this, sorry")
>          return
>  
>      # Change working directory to repository root
>      os.chdir(TESTS_PATH + "/../..")
>  
>      if not os.path.exists('src/.libs/libnftables.so'):
> -        print "The nftables library does not exist. " \
> -              "You need to build the project."
> +        print("The nftables library does not exist. " \
> +              "You need to build the project.")

nit: The trailing '\' can be removed now that the strings are inside
parenthesis. I don't think it's worth rerolling the patch though.

             reply	other threads:[~2019-05-23 19:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 19:39 Shekhar Sharma [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-22  9:07 [PATCH nft v3]tests: py: fix python3 Shekhar Sharma
2019-05-22 10:05 ` Pablo Neira Ayuso
2019-05-22 10:39 ` Shivani Bhardwaj

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=20190523193908.405176-1-shekhar250198@gmail.com \
    --to=shekhar250198@gmail.com \
    --cc=eric@garver.life \
    --cc=netfilter-devel@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).