From: "Ma, LihongX" <lihongx.ma@intel.com>
To: "Mo, YufengX" <yufengx.mo@intel.com>,
"dts@dpdk.org" <dts@dpdk.org>,
"Tu, Lijuan" <lijuan.tu@intel.com>
Subject: Re: [dts] [PATCH V3 1/3] framework: check the python version
Date: Fri, 23 Oct 2020 07:51:00 +0000 [thread overview]
Message-ID: <BN8PR11MB37159D507D38DFF58792601C9E1A0@BN8PR11MB3715.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201023070959.32951-2-yufengx.mo@intel.com>
> -----Original Message-----
> From: Mo, YufengX <yufengx.mo@intel.com>
> Sent: Friday, October 23, 2020 3:10 PM
> To: dts@dpdk.org; Tu, Lijuan <lijuan.tu@intel.com>; Ma, LihongX
> <lihongx.ma@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts][PATCH V3 1/3] framework: check the python version
>
>
> implement a method to check the python version of tester and the server
> that run dts.
> If the version is python2, print a warning message.
>
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
> framework/utils.py | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/framework/utils.py b/framework/utils.py index e74e6c5..9082e35
> +def check_dts_python_version():
> + if sys.version_info.major < 3 or \
> + sys.version_info.minor < 6 or \
> + sys.version_info.micro < 9:
> + print(RED(
> + ("WARNING: Dts running node python version is lower than
> python 3.6, "
> + "it is deprecated for use in DTS, "
> + "and will not work in future releases.")), file=sys.stderr)
> + print(RED("Please use Python >= 3.6.9 instead"),
> +file=sys.stderr)
> --
> 2.21.0
As the judgment condition is 'or', I think if my python3 version is 3.8.2, it will still print the warning information.
Can you check and optimize it ?
Regards,
Ma,lihong
next prev parent reply other threads:[~2020-10-23 7:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-23 7:09 [dts] [PATCH V3 0/3] " yufengmx
2020-10-23 7:09 ` [dts] [PATCH V3 1/3] " yufengmx
2020-10-23 7:51 ` Ma, LihongX [this message]
2020-10-23 7:09 ` [dts] [PATCH V3 2/3] " yufengmx
2020-10-23 7:09 ` [dts] [PATCH V3 3/3] " yufengmx
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=BN8PR11MB37159D507D38DFF58792601C9E1A0@BN8PR11MB3715.namprd11.prod.outlook.com \
--to=lihongx.ma@intel.com \
--cc=dts@dpdk.org \
--cc=lijuan.tu@intel.com \
--cc=yufengx.mo@intel.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).